News for hackers. Stuff that matters.
Re:Cron commands to plain English by ColinWright on Saturday August 02, 2014 @06:22AM (#8124569)
OK, so I gave it this:

    8-59/30 * * * * do_something
It replied:

    The command do_something will execute
    the 8th through 59/30th minutes of
    every hour every day.
That's a pretty poor description of something that will run at 8 and 38 minutes past the hour, every hour of every day.

Not impressed - seems overly simplistic.

Re:Cron commands to plain English by pbyrne on Saturday August 02, 2014 @10:04AM (#8124915)
> Not impressed - seems overly simplistic.

Agreed that it's not impressive, beings that the explanation is simply wrong. It's an edge case I'm definitely not handling properly. I've got [an open issue](https://github.com/pbyrne/cron-checker/issues/7) about combining ranges and modulo, but haven't gotten around to implementing it yet. Displaying an incorrect explanation is probably worse than no explanation, though, in retrospect.

Re:Cron commands to plain English by ColinWright on Saturday August 02, 2014 @11:31AM (#8125069)
The challenge is to decide what you would want it to say in the case of, say, "14-59/15". Do you want it to list all the possibilities? That becomes tedious if you have something like 2-57/2. Do you want to try to create a more direct plain English parse?

    14-59/15 - Every 15th minute starting with the 14th
               up to and including the 59th.

     2-57/2  - Every 2nd minutes starting with the 2nd
               up to and including the 56th.
A choice needs to be made - the direct plain English parse is quite long, and not always easy to read.