Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron Format not the same as Cron Spec #58

Closed
bryanvpham opened this issue May 18, 2016 · 3 comments
Closed

Cron Format not the same as Cron Spec #58

bryanvpham opened this issue May 18, 2016 · 3 comments

Comments

@bryanvpham
Copy link

Out of all the libraries and sites I've seen everybody who uses the six * supports year instead of seconds.
For Example:
http://www.nncron.ru/help/EN/working/cron-format.htm

I personally think it would be better to follow what everyone else is doing to avoid confusion. It also lets it work with libraries that convert cron strings into human-readable format.

I don't think running a function every second is very good use case nor is running functions at specific second intervals. Might as well just use "sleep" or tickers. Years probably won't be that useful either but having a more compatible format would be nice.

@soltysh
Copy link
Contributor

soltysh commented Aug 9, 2016

@robfig I'd like to expose a 2nd method to comply what was stated here, so that you're able to provide the usual 6 fields, are you ok with me doing so? It won't happen sooner than beginning of September when I'm back from PTO.

@robfig
Copy link
Owner

robfig commented Aug 9, 2016

Yeah, I agree. I wrote it so long ago now that I have no idea why I would have done seconds instead of years -- I thought I just implemented it according to the wikipedia Cron page, but that doesn't have seconds either. Maybe I was using the Quartz format instead. Adding a second method seems like the right way to handle it to avoid breaking existing users.
Thank you!

@saraswat40
Copy link

saraswat40 commented Aug 9, 2019

Can someone provide an example of how this will be used? The current documentation assumes that a 5 option string will be passed. Is the 6 option string handled implicitly? Is it possible to update the documentation to include a 6 option example? I am trying to create a parser which would support cron jobs to run say every other year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants