Results 1 to 1 of 1
-
20th Mar 2014, 01:15 PM #1
Cron jobs
A 'cron job' is an automated task that can be set up within your cPanel. This will typically be used to automate the running of a reminder script each day for example, or perhaps to run your own daily backup script. Any server task or script that needs regular scheduling is the perfect opportunity to use a cron job.
We would ask that you be sparing with your use of cron jobs however, as a resource-intensive script executing every five minutes for example would clearly breach our acceptable use policy. Our recommendation would be to schedule cron jobs to run only as and when they are needed.
Your online cPanel allows for the creation of cron jobs via a simple web interface. This is presented in plain english, and requires little understanding to operate.
If you decide to use the "Advanced" option however, the following information may assist you in understanding how the system works.
Understanding the format
r----Minute
| r-----Hour
| | r------Day of Month
| | | r------Month
| | | | r------Day of Week
| | | | | |------ Command to run ------------->
| | | | | |
5 4 * * 0 /path/to/whatever/script.cgi
The weekday number runs from 0 to 6, where 0 = Sunday.
Comma-separated values are accepted in each column, so "10,30,50" in the "Minute" column will run the cron job at 10 past, 30 past and 50 past whichever hour(s) are specified. Similarly, a value of */5 will ensure the job is run every five minutes on whichever hour(s) are specified.
Examples
5 4 * * 0 /path/to/whatever/script.cgi
Runs the script at 4:05 every sunday.
*/5 * * * * lynx --dump http://site.com/script.php
Loads the page http://site.com/script.php every 5 minutes.
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out
Runs five minutes after midnight, every dayAreon Reviewed by Areon on . Cron jobs A 'cron job' is an automated task that can be set up within your cPanel. This will typically be used to automate the running of a reminder script each day for example, or perhaps to run your own daily backup script. Any server task or script that needs regular scheduling is the perfect opportunity to use a cron job. We would ask that you be sparing with your use of cron jobs however, as a resource-intensive script executing every five minutes for example would clearly breach our Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
themaManager - edit and manage...
Version 4.04 released. Open older version (or...