Starting a script at a scheduled time

Posted on 2006-06-08
Last Modified: 2010-08-05
I want to be able to schedule a script (hopefully php) to run at a specified tme each day.

How can I do that? Is that a feature within Apache or in the operating system itself?
Question by:Richard Korts
    LVL 10

    Expert Comment

    Which operating system?

    Author Comment

    by:Richard Korts
    I believe it's Linux web79 2.4.31 #8
    LVL 1

    Accepted Solution

    I believe what you're looking for is the crontab command (in the operating system shell).  You can read more about it at or by the command "man crontab".

    Essentially, you'll want to log in as the root user and execute the command "crontab -u root -e".  Then you'll be taken to the system's default text editor, where you can enter a line like
    30  20  *  *  *  /path-to-script/script.php
    Then save and exit.  The above line would have script.php execute at 20:30 = 8:30pm every day.

    Hope that helps.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting ( to http…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now