CRON Automatically Run Jobs on Your Website - Since we get...
(Page 3 of 4 )
Since we get busy and forget to do this weekly, a method to have our web host perform this automatically was the answer.
The CRON function is very flexible and can be set to run on almost any time frequency you can imagine.
If you specify a minute in the first field and an hour (24 hour clock) in the second field and leave all the other fields as asterisks, the specified program will run on that hour and minute every day. If you want the program to run twice a day at 10 and 11 AM, you can write the CRON as:
CRON 0 10,11 * * * Command to execute
With the proper combinations, you can set up a job to run automatically on almost any schedule that you can imagine.
Lets try a few. Write a CRON to execute on every Sunday at midnight.
If you got 0 0 * * 0 Command to execute", then you are right. The zero in the first position is on the hour. The zero in the second position is midnight. The zero in the fifth position (day of the week) is Sunday. This is what we used for our CRON settings for the CD AD Box update.
More Web Development Articles
More By Jase Dow