Content has been updated elsewhere, would you like to reload?

*** Warning: If you do not reload, you may be editing obsolete contents. This may cause you to lose recent changes.

Yes, reload    |    No, keep this older content
  • Cron Jobs are scheduled tasks such as logging, backup, and checking whether a Web page works properly. In Ubuntu, you can simply edit an existing text file, inserting a line of 5 segments of text: "M H D M weekday command". You can use that "command" to run PHP script to update database, for example. In Windows, if you are running XAMPP package, you would use Window's own Task Scheduler to run that same PHP script.

    • What is a cron job?
    • How do I create or edit a cron job in Ubuntu?
    • How do I run a PHP script with cron job?
    • What are possible problems and how to troubleshoot them?
    • What if I need to specify the directory for my script and working files?
    • How do I run a cron job in Windows and XAMPP, using Task Scheduler?
  Dishes  - Ubuntu Cron Tutorials & Videos
  • Dish 5 : How-to for crontab |

  • crontab -e             (to edit cron file)

    01,31 04,05 1-15 1,6 * /usr/bin/somedirectory/somecommand

    (The above example will run /usr/bin/somedirectory/somecommand at 01 and 31 past the hours of 4:00am and 5:00am on the 1st through the 15th of every January and June.)

  • What Is Crontab? A crontab is a simple text file that holds a list of commands that are to be run at specified times. These commands, and their related run times, are controlled by the cron daemon and are executed in the system's background. More information can be found by viewing the crontab's man page. We will run through a simple crontab example later. How Does It Work? The system maintains a crontab for each user on the system. In order to edit or create a crontab, you mus
  Chops  - PHP Script & XAMPP in Windows
  • Chop 1 : How to run PHP scripts from cron jobs | A2 Hosting

  • Use CURL, WGET, or PHP command-line interpreter.

    A common method for running PHP scripts from a cron job is to use a command-line program such as curl or wget. For example, the cron job runs a command similar to the following command:


    In this command, curl retrieves the web page, which then runs the PHP script.

    However, there is a better way to run PHP scripts on your web site from cron jobs. You can run the script directly by using the PHP command-line interpreter. This method is just as effective, and usually faster. The following command shows how to run a script using the PHP command-line interpreter:

    /usr/local/bin/php -q /home/username/public_html/script.php

    In this example, the PHP command-line interpreter runs the script.php file. The -q option enables quiet mode, which prevents HTTP headers from being displayed.

  References and More

You are welcome to

  • Sign in through   Sign in or sign up with your Facebook account   Sign in or sign up with your Google account   Sign in or sign up with your Amazon account
  • Create your own Web list!
  • Save this into your reading list.
  • Write a comment below.
  • Share this Web list through email or with other Readish users.
Course info
8  4  0  4  0
Language: EnglishThis course is owned by Durio
By Durio

Tags for this course
Suggested courses    Hide
  • Move to:
Open All         >>