Reputation: 6531
How to handle fractions with cron? I want to schedule a task to run every 7.5 minutes, was not able to succeed with that.
Basically, 8 times in an hour.
Thanks
Upvotes: 0
Views: 2694
Reputation: 34205
You can't do it in cron directly. Cron doesn't support fractions in the time. You've got 2 options really:
in your crontab:
*/25 * * * * the_task
*/25 * * * * sleep 750 ; the_task
This will spawn both tasks at the same time, but run the second one after sleeping 12.5 minutes. Just make sure your cron does start both tasks at the same time - I don't think the behaviour on 'every x minutes' is standardised.
Upvotes: 2