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

Why no year field? #30

Closed
Rui90 opened this issue May 24, 2017 · 5 comments
Closed

Why no year field? #30

Rui90 opened this issue May 24, 2017 · 5 comments
Labels

Comments

@Rui90
Copy link

Rui90 commented May 24, 2017

Why don't you provide the year definition? It does not make sense. Should I be able to say: run this task only once in this date? 20/2/2037?

@atifaziz
Copy link
Owner

atifaziz commented May 24, 2017

This is by-design. See #28 for why.

Should I be able to say: run this task only once in this date? 20/2/2037?

You don't need crontab to express that since it never repeats. A simple date should be fine for that.

@atifaziz atifaziz changed the title Year Why no year field? May 24, 2017
@atifaziz
Copy link
Owner

atifaziz commented Jun 1, 2017

Closing on the assumption the question is answered.

@atifaziz atifaziz closed this as completed Jun 1, 2017
@thojaw
Copy link

thojaw commented Jun 28, 2019

It's not true that it doesn't make sense. I'd love to define the Expression 0 0 0 1 1 ? */2 which will run the Task every two years, on 01.01.2020, 01.01.2022, 01.01.2024 etc.

@atifaziz
Copy link
Owner

It's not true that it doesn't make sense. I'd love to define the Expression 0 0 0 1 1 ? */2 which will run the Task every two years, on 01.01.2020, 01.01.2022, 01.01.2024 etc.

I agree but the opening comment in the issue was about a specific year and perhaps I was taking too literally. That said, I'm still not very inclined to add this since, as I said my comment in #28, it's non-standard:

According to Wikipedia:

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

@thojaw
Copy link

thojaw commented Jul 17, 2019

I agree but the opening comment in the issue was about a specific year and perhaps I was taking too literally. That said, I'm still not very inclined to add this since, as I said my comment in #28, it's non-standard:

According to Wikipedia:

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

Understand, it's a pity that it (the standard implementation) limits the intervals to a period < 1 year. This appears quite shortsighted especially when using these expressions as a more general, useful notation to express intervals, e.g. when I have to renew my Car registration in May every 2 years.

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

3 participants