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

Is seventh field invalid? #28

Closed
YoungjaeKim opened this issue Apr 7, 2017 · 2 comments
Closed

Is seventh field invalid? #28

YoungjaeKim opened this issue Apr 7, 2017 · 2 comments
Labels

Comments

@YoungjaeKim
Copy link

0 0 12 1/1 * ? * is Invalid in NCronTab (created from CronMaker) with below exception message,

CrontabSchedule.ParseOptions options = new CrontabSchedule.ParseOptions()
{
	IncludingSeconds = true,
};
CrontabSchedule.Parse("0 0 12 1/1 * ? *", options);

CrontabException: '0 0 12 1/1 * ? *' is an invalid crontab expression. It must contain 6 components of a schedule in the sequence of seconds, minutes, hours, days, months, and days of week.

But, 7th field is optional Year expression as official documentation described; http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06

Did you consider it as an error?

@atifaziz
Copy link
Owner

atifaziz commented Apr 7, 2017

NCrontab does not support a year field.

But, 7th field is optional Year expression as official documentation described; http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06

Who says that Quartz is the official documentation on crontab expressions?

According to Wikipedia:

[Year] field is not supported in standard/default implementations.

@YoungjaeKim
Copy link
Author

YoungjaeKim commented Apr 7, 2017

Ah, got it.
thanks for clarification.

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

No branches or pull requests

2 participants