Cron Job Tutorial




For setup a cron job you need to know two things:
1. When to run the job? (e.g every 30 mins, every 10pm each day etc...)
2. The command or the file you want to execute.

The format of the crontab schedule is:
minute hour day month day-of-week command-line-to-execute

Acceptable values:
minute: 0-59
hour: 0-23
day: 1-31
month: 1-12
day-of-week: 0-7 (where both 0 and 7 mean Sun, 1 = Mon, 2 = Tue, etc)
command-line-to-execute the command or the file to run.



Cron Job Examples:
To run cron-test.php at 4.15pm every day your cron control panel should look like:

cron job example


To run cron-test.php at May 15th 03:30 AM your cron control panel should look like:

cron job example

*Please note that the time field uses 24 hours format.
So, for 6 AM use 6, and for 6 PM use 18.

Get Free Hosting with cron jobs support from FreeHostingNoAds.net .

 

Did you find this helpful? Recommend it to your friends.

 

Free Website
© 2010 - 2017 Free Hosting No Ads . All Rights Reserved