azza-bazoo / prettycron

Display cron runspecs in human-readable format
GNU Lesser General Public License v3.0
122 stars 62 forks source link

Support seconds #22

Closed Faleij closed 7 years ago

Faleij commented 8 years ago

* * * * * * should yield "Every second". 30 * * * * * should yield "Every 30th second past every minute".

rsiebeling commented 8 years ago

Agree, I've encountered the same issue, this should be fixed I think

bryanvpham commented 8 years ago

I've encountered the same issue because I've been using some Golang Cron implementation. What I've found though is that nobody really supports seconds for CRON format. When using six fields, the sixth one is year and the first is minute usually. If you think about it the use cases for seconds aren't very useful anyways. If you are running something every second, you might as well just "sleep".

qrpike commented 8 years ago

+1

anderssonjohan commented 8 years ago

Ok, I've started to implement this in #28. Please give me feedback on this one.

30 * * * * * now prints Every minute starting at the 30th second */30 * * * * * now prints Every minute starting at the first and 30th second