Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7722891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:18:22+00:00 2026-06-01T04:18:22+00:00

I am about to trigger a call to a PHP file via curl in

  • 0

I am about to trigger a call to a PHP file via curl in a schedule basis. I am thinking of having the script to be executed every 23:59:59 or simply a minute before the day turns tomorrow. Any best approach for this? Quite confused still on the cron settings.

I need to ensure that I run at exactly a second before the next day.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:18:24+00:00Added an answer on June 1, 2026 at 4:18 am

    To Execute a script every day at 23:59:00, use the following:

    59 23 * * * root /path_to_file_from_root
    

    Seconds cannot be defined using Cron, but this should do for you.

    To execute the script at 23:59:59, use the PHP sleep() function to delay the execution of the script by 59 seconds. I would advise 58 seconds though, just to make sure the script doesn’t delay until after midnight.

    This is very basic, you could make it a little more complex and run tests to ensure that the script is always run at 23:59:59 by retrieving the time and delaying appropriately. This should not be necessary though.

    <?php
    
        // Any work that the script can do without altering the database, do here
    
        // Delay the script by 58 seconds
        sleep(58);
    
        // Carry on with the rest of the script here, database updates etc
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP, I'd like to get the details about a function call inside the
In cleaning up this answer I learnt a bit about TRIGGER s and stored
About 6 months ago I rolled out a site where every request needed to
We're using Quartz.Net to schedule about two hundred repeating jobs. Each job uses the
I have an area which gets populated with about 100 records from a php
I'm having an internal debate about where I should handle checking for changes to
I have a script that currently has a step where I trigger a voice
We call a .live() method like this: $('.link').live('click', loadContent); But what about if I'm
I've been hearing about triggers, and I have a few questions. What are triggers?
I know about Allow Triggers to Fire Others server setting that allows the action

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.