-
Notifications
You must be signed in to change notification settings - Fork 622
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
CronTime day of week is non-standard (Sunday is 1, not 0) #36
Comments
Hey, Yes. I speak patches. :) I would like things to be consistent. Obviously both would break things so I'd upgrade the version and make it clear that there was a break in backwards compatibility. But, I'm ok with this so long as it makes the library more consistent. |
Hello, When is this getting into the code? Currently, it's definitely inconsistent. Thanks! |
I haven't seen a patch for this yet. I'm not sure if anyone is actively working on it. |
I can pick this up again at some point. @pixelfreak, are you more interested in the 5-digit crontime syntax or the day-of-week inconsistency? |
More interested in the day-of-week inconsistency. Thanks! |
Actually, I am curious why there exists two different cron format and which is better. For example, the linux cron we are all familiar with can't do seconds interval, but this one can. So maybe it's better to keep it that way? |
Since linux cron is the standard, personally I think node-cron should be consistent with its syntax/functionality. This would mean changing day-of-week to be consistent. Since the seconds interval doesn't contradict any standard cron syntax, it should just be an optional extended syntax (only if 6 digits are included). Will prepare the patch and see if people need backwards compatibility. |
Sounds good. I'll review it in a separate branch anyway before including it.
|
Alrighty, pull request up at https://github.com/ncb000gt/node-cron/pull/41. There are some comments in there. Let me know what you think. |
Completed with GH-41. |
The documentation referenced in the readme says that day of week is 1-7, Sunday being 1.
http://help.sap.com/saphelp_xmii120/helpdata/en/44/89a17188cc6fb5e10000000a155369/content.htm
All other crontab documentation I see says that day of the week is 0-6, Sunday being 0.
http://crontab.org/
http://en.wikipedia.org/wiki/Cron
http://www.adminschoice.com/crontab-quick-reference
Mind if I submit a patch to change? Or would you like a "compatibility mode" that explicitly requests real cron times?
I'd also like to support the standard 5-digit crontime syntax that doesn't include seconds. Mind if I submit a patch to default to "a b c d e f" to "0 a b c d e f" ?
The text was updated successfully, but these errors were encountered: