floraison / fugit

time tools (cron, parsing, durations, ...) for Ruby, rufus-scheduler, and flor
MIT License
355 stars 29 forks source link

Every x minute is parsed incorrectly for cron #8

Closed peterzhu2118 closed 5 years ago

peterzhu2118 commented 5 years ago

image

*/55 * * * * should run once every 55 minutes, but fugit runs it at x:55 and x:00, where x is 0-23. In the example above, it's ran at 12:00, 12:55, 13:00, 13:55, etc. when it should run at 12:00, 12:55, 13:50, 14:45, etc.

jmettraux commented 5 years ago

Hello Peter, thanks for starring fugit.

I stand behind my implementation. I have just re-read man 5 crontab and especially https://en.wikipedia.org/wiki/Cron#CRON_expression, and I think I have done it right.

Best regards.

peterzhu2118 commented 5 years ago

@jmettraux I just closed it because I realized it was a mistake on my part 😄, sorry about that! Thanks for looking into it!

jmettraux commented 5 years ago

@peterzhu2118 OK, thanks anyway!