Logical Dolphin
Newbie
Karma: 10
Offline
Posts: 6
|
 |
« on: January 18, 2007, 06:10 » |
|
I read through this blueprint and the part on page 13 (under "Example")regarding Crons appears to be completely wrong.
As written on the blueprint:
"Set your cron to update every 25 hours. This way, it’s always at a different hour than the day before. The cron to update every 25 hours looks like this:
10 */24 * * * 10 is the 10th minute of the hour, and */25 means every 25 hours. In this case, the first post may show at something like 1.10pm, the next day it will update at 2.10pm, the next day, 3.10pm, and so on. Then cycle repeats itself."
There seems to be an inconsistancy (*/24 on one line and */25 on another), and based on what my research both are invalid values for the hour crontab.
According to Wikipedia these are the valid ranges for the crontabs:
# (Use to post in the top of your crontab) # ----------------- minute (0 - 59) # | -------------- hour (0 - 23) # | | ----------- day of month (1 - 31) # | | | -------- month (1 - 12) # | | | | ----- day of week (0 - 7) (Sunday=0 or 7) # | | | | | # * * * * * command to be executed
The rest of the example on that blueprint example is as follows:
"However, a more tricky command is this:
*/1500 * * * *
This cron command will update your blogs every 1500 minutes, which means actually every 25 hours. But if you will use instead of 1500, some number like 1534, your blogs will update every 25 hours and 34 minutes. It’s harder to calculate how the update schedule would look, but in this case, if first post is at 1.00pm sharp, the next will be at 2.34pm (the next day), the next 3.08pm, next 4.42pm, and so on. Pretty cool eh?"
Again, the 1500 (and 1534) values are invalid for the minute crontab, because it only accepts values (0-59).
I liked this strategy presented in the blueprint for utilizing cronjobs and tried to implement it in Cpanel, and couldn't get it to work. After doing research on the internet regarding crons, it appears as I said before, that the values presented in that example simply won't work.
I hope I am wrong about this, and if so, someone please let me know how to get the crons to work as presented in that example.
Thanks.
|