We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,386 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Cron job interval larger than 60 mins

I'm not sure exactly which forum to ask this,so I'm starting here,

I have a cron job I want to execute every 72 minutes. I've researched how to schedule the job for an interval of 60 min or less, but is there a way to specify a minutes interval when the required interval is > 60 ?

3
Contributors
3
Replies
1 Month
Discussion Span
3 Months Ago
Last Updated
13
Views
chophouse
Light Poster
29 posts since Apr 2008
Reputation Points: 23
Solved Threads: 1
Skill Endorsements: 0

I think you can use a multi-entry crontab like this:

0 0,5,10,15,20 * * * cmd-to-run
12 1,6,11,16,21 * * * cmd-to-run
24 2,7,12,17,22 * * * cmd-to-run
36 3,8,13,18,23 * * * cmd-to-run
48 4,9,14,19 * * * cmd-to-run

rubberman
Posting Maven
2,581 posts since Mar 2010
Reputation Points: 365
Solved Threads: 308
Skill Endorsements: 52

How would i use that to define an interval of every 72 minutes ? Not sure I understand.

chophouse
Light Poster
29 posts since Apr 2008
Reputation Points: 23
Solved Threads: 1
Skill Endorsements: 0

Rubberman has you running the command
on the hour for 12 midnight, 5 am, 10 am, etc.
12 mins after the hour for 1 am, 6 am, ...
24 mins after the hour for 2 am, 7 am, ...
etc.
Very clever.

DoRight
Light Poster
35 posts since Feb 2013
Reputation Points: 2
Solved Threads: 4
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0875 seconds using 2.7MB