News for hackers. Stuff that matters.
Re:Cron checker by Bromskloss on Saturday July 16, 2016 @04:54AM (#12105713)
> It even handles that crazy case where you want to run on a specific day of the week.

Does it handle the, in my opinion, not crazy case of running something every, say, 100 seconds?

Re:Cron checker by borski on Saturday July 16, 2016 @04:58AM (#12105718)
Sadly, no. The minimum granularity is in minutes.
Re:Cron checker by Bromskloss on Saturday July 16, 2016 @05:14AM (#12105747)
What about every 100 minutes?
Re:Cron checker by mappu on Saturday July 16, 2016 @09:58PM (#12108702)
If you're really stuck with this requirement, and vixie cron is your only tool:

    */1 * * * * /usr/bin/bash -c '[[ $(( $(/usr/bin/date +%s) % 6000)) -eq 0 ]] && mycommand'
Re:Cron checker by jstimpfle on Saturday July 16, 2016 @06:23AM (#12105868)
It's not designed for frequencies that don't align well with the partition of time in months, weeks, days, hours, minutes.

But you probably can tweak your requirement slightly.

Re:Cron checker by edoceo on Saturday July 16, 2016 @12:35PM (#12106897)
With fcron the line looks like

    @100 /do/my/thing.sh
Re:Cron checker by pekeler on Saturday July 16, 2016 @01:57PM (#12107255)
Is fcron stateful so that it remembers if the schedule started today at midnight, the first time it should run tomorrow is at 1am?
Re:Cron checker by edoceo on Saturday July 16, 2016 @03:35PM (#12107581)
As far as I can tell and if IIRC its across reboots too. I can't remember all the reasons I moved to fcron (10+ years ago) but the @# syntax was one factor
Re:Cron checker by Bromskloss on Sunday July 17, 2016 @04:18PM (#12111614)
> the @# syntax

Watch your language!

Re:Cron checker by bahjoite on Saturday July 16, 2016 @05:46AM (#12105802)

  */100 * * * * echo "every 100 mins"
Re:Cron checker by soneil on Saturday July 16, 2016 @06:04AM (#12105832)
Have you tried this? Since minute only counts from 0-59, it's never divisible by 100.

I have a similar problem with "every 2 days". */2 looks simple enough, but it fires on the 29th, miss 30th, fires on 31st, then fires the 1st. 3 times in 4 days isn't "every 2 days".

Cron only works for periods which are evenly divisible into the calendar. "every 7 minutes" doesn't work because 60 isn't evenly divisible by 7. "every 5 hours" doesn't work (in that it'll match 8pm and midnight, which are only 4 hours apart), etc.

Re:Cron checker by bahjoite on Saturday July 16, 2016 @10:29AM (#12106425)
You're right; thank you for pointing out my mistake. Every day's a school day.
Re:Cron checker by gkya on Saturday July 16, 2016 @08:51AM (#12106173)
Well in cron "every two days" is more like "every second day of a month", and "ever 5 hours" like "every fifth hour of a day".
Re:Cron checker by soneil on Saturday July 16, 2016 @09:37AM (#12106281)
I guess that's what I was getting at. "every 100 minutes" doesn't work, because cron reads it as "every 100th minute of an hour".
Re:Cron checker by jwilk on Saturday July 16, 2016 @03:45PM (#12107610)
0 is divisible is by 100.