Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You misunderstand what he's saying. Because 60 doesn't divide into 7, don't use one 60 minute cron job. Use 7 cron jobs. You could get this magical 7 minute experience over a 24 hour period by creating the following 7 jobs:

0-56/7 0-21/7 * * * Command

3-59/7 1-22/7 * * * Command

6-55/7 2-23/7 * * * Command

2-58/7 3-17/7 * * * Command

5-54/7 4-18/7 * * * Command

1-57/7 5-19/7 * * * Command

4-53/7 6-20/7 * * * Command

Of course, the last job would finish at 23:55, and the next start at 00:00 which is bad. So you'd need to do it on a per day basis. Luckily there are 7 days in the week. So you would just need to write those 7 jobs above on a per day basis. You'd end up with 49 jobs all looking similar to this:

0-56/7 0-21/7 * * Wed Command



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: