I want to know whether there is any easier way to run a job every 25 minutes. In cronjob, if you specify the minute parameter as */25, it'll run only on 25th and 50th minute of every hour
migrated from stackoverflow.com Jul 20 '11 at 16:10
|
Your best bet is to run at 20 minutes or 30 minutes. You next best might be to trigger every 5 minutes, and then keep an internal count or timestamp, and run every 5th trigger, or if 25 minutes have elapsed since the last run. More complicated would be to work out the correct times for a day, starting at midnight, and accept the error at the end of the day. This would involve duplicating the crontab entry to the different hours. More complicated than that would be to work out the times for an entire month, which would involve many copies of the crontab entry to cover the different combinations. Finally you could implement your own always on daemon, and have that do the scheduling. |
|||
|
|
|
The command in crontab is executed with
As others have pointed out, 1 day is not evenly divisible by 25 minutes, so this will not cause |
|||
|
|
|
I have no direct experience with it, but fcron appears to do what you want out of the box. According to its documentation you can specify frequencies:
|
|||
|
Let me explain in short what's the problem here. Entering 25 in the minute field causes 0, 25, 50 But here again, 24 (hours a day) isn't divisable by 5, the least common multiple of 5 & 24 is simply 5 * 24 = 120. & so on and on... |
||||
|
|
You may play with the last modification time of a file
Your crontab would look like this (assuming 25 minutes equals 1500 seconds if I'm right)
Note that I use |
|||
|
|
|
I think the following should work 0 0/25 * * * ? |
|||||
|
