floraison / fugit

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

[Documentation] Regex for crontab notation #32

Closed christianfl closed 4 years ago

christianfl commented 4 years ago

Hi,

I'm working on a frontend which lets the user input a crontime to generate a cronjob for sidekiq-cron in the backend.

I'm validating the string backend-wise with your validate method but do you maybe have a regex for doing the validation in the frontend, too? A good documentation which cron string is allowed would also work, of course.

Typical cron regexes didn't work because of your optional 6 digit syntax and so on..

Thank you in advance!

jmettraux commented 4 years ago

Hello,

I don't have a regex, sorry.

I don't really have a documentation, but there's the cron parser itself. It's using raabro like the other parsers in fugit.

I hope this will help you.

I am closing the issue but not the conversation. Best regards!