3

Are there any crontab interface "shortcuts" in any (compatible/compliant) version of cron? We run some scripts with a regular interval, but offset.

I dislike lines like this;

3,8,13,18,23,28,33,38,43,48,53,58 * * * * command

I believe I have tried something like;

3/5 * * * * command
and
*/5+3 * * * * command before to no avail.

Is there any way to normalize/shrink cron entries with offset schedules such as the above?

2 Answers 2

10
3-59/5 * * * * command

Should start the job at 3 minutes after the hour and run it every 5 minutes until 59 minutes after the hour.

3

*/5 will get you every 5 min

3-58/5 should get you every 5 min starting at 3

http://www.nncron.ru/help/EN/working/cron-format.htm

1
  • Your source is GREAT, but aggravating that the answer to my question is not in one of the block-level examples, but is just a paragraph. (This has nothing to do with your answer, just vocalizing a chuckle I had when reading.)
    – VxJasonxV
    Oct 7, 2010 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.