3 ms·
Well, you could put multiple cron lines in. e.g. for every 8 minutes: 0,8,16,24,32,40,48,56 0,2,4,6,8,10,12,14,16,18,20,22 * * * cmd 4,12,20,28,36,44,52 1,
by omh 16y ago
Well, you could put multiple cron lines in.
e.g. for every 8 minutes:
0,8,16,24,32,40,48,56 0,2,4,6,8,10,12,14,16,18,20,22 * * * cmd
4,12,20,28,36,44,52 1,3,5,7,9,11,13,15,17,19,21,23 * * * cmd
This starts to get a bit silly when the interval isn't a factor of 24 though.
- mathgladiator 16y agoI wrote a simple script to generate cron tab specs for "every X minute", and while I enjoyed using gcd and lcm in a real application; something wasn't right. 7 is a very canonical and crazy case because it takes 7 days to cycle. but even then, it doesn't work with months except for February for non leap years.