|
|
|
|
|
|
![]() |
#18 | |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
Quote:
To use it, you would input a string of symbols/numbers and the path to the script and what you wanted it to do. If you wanted to have it call a maintenance script every hour at the top of the hour, the entry would look like: Code:
0 * * * * /usr/bin/wget -O /dev/null http://url.com/maintenance.php 2>&1>/dev/null The first field is the minute, the second is the hour -- the rest are usually not used often, but they are day of month, month, day of week. So, if you wanted something to run every 5 minutes, the first part would be: */5 * * * * To run on the 15s, you can do something like: */15 * * * * or 0,15,30,45 * * * * As you can see, its pretty flexible and you can do quite a bit with it. Running a task every monday at midnight would look like: 0 0 * * 1 (1 = Monday. 0 & 7 = Sunday) Some webhosts have a control panel that hides some of the complexity figuring out the numbers -- and there are webpages that allow you to calculate what the resulting line would look like. crontab generator is but one example. Getting your cron job installed on the server can sometimes require ssh access, or, your webhost to handle it through the control panel or a trouble ticket. Some scripts do attempt to create the jobs themselves with some success depending on how the webhost runs their security.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
|
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|