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

Fortnight how to run a Job every Fortnight , It's every second SAT. or /14 days. #63

Open
georgioua opened this issue Dec 5, 2023 · 6 comments

Comments

@georgioua
Copy link

Fortnight how to run a Job every Fortnight , It's every second SAT. or /14 days.

@aravind-alapati
Copy link

This 0 0 * * 6#2 should work, reference: https://github.com/HangfireIO/Cronos#cron-format

@georgioua
Copy link
Author

6=SAT
Is SUN=0 or 7?
MON=1 ?

@aravind-alapati
Copy link

Both 0 and 7 means SUN
and MON =1

image

@georgioua
Copy link
Author

This is not fortnight still. It's every second Saturday of the month.

@aravind-alapati
Copy link

Isn't it what you asked for ?
image

@christianhsmebye
Copy link

christianhsmebye commented May 7, 2024

Have the same problem here.
I want to run a job every second friday. The Cron expression "0 0 * * 5#2,5#4" will run every other Friday, that is, the second and fourth Friday of each month. Starting from today (May 3, 2024), the next runs in 2024 will be:
May: 10th (2nd Friday) and 24th (4th Friday)
June: 14th (2nd Friday) and 28th (4th Friday)
July: 12th (2nd Friday) and 26th (4th Friday)
August: 9th (2nd Friday) and 23rd (4th Friday)

The problem here is that there is not every second friday:
May: 10th and 24th
June: 7th and 21th
July: 5th and 19th
August: 2th, 16th and 30th.

May is OK, but from June... not OK.

So, the feature request here is a kind of "skip". Ex: skip 0 means every occation, skip 1 means that you skip one occation, skip 2 means that you skip two occation etc. This means that you need a "fromDate" or something to indicate start of the first occation.

This would be very helpful! Thanks!

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

No branches or pull requests

3 participants