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

Use Cronos instead of NCrontab #853

Merged
merged 8 commits into from
May 29, 2017
Merged

Use Cronos instead of NCrontab #853

merged 8 commits into from
May 29, 2017

Conversation

aidmsu
Copy link
Contributor

@aidmsu aidmsu commented Mar 30, 2017

This PR fixes #494, #567 by using Cronos instead of NCrontab in RecurringJobScheduler.

Pros of using Cronos:

  • time zones support out of the box;
  • correct Daylight Saving Time handling;
  • support of non-standard characters: L, W, #, ?;
  • performance: it's really very fast.

It means that:

  • recurring jobs won't be missed on standard time (ST) to Daylight Saving Time (DST) transitions (when the clock jumps forward);
  • minutely, hourly jobs won't be missed on DST to ST transitions (when the clock jumps backward);
  • daily, monthly jobs won't be repeated on DST to ST transitions;
  • users can schedule recurring jobs more flexible using non-standard characters. Example for last weekday of month: RecurringJob.AddOrUpdate(() => SomeMethod(), "* * LW * *")

Read more about all features.

@codecov-io
Copy link

codecov-io commented Mar 30, 2017

Codecov Report

Merging #853 into dev will decrease coverage by 0.18%.
The diff coverage is 81.81%.

Impacted Files Coverage Δ
src/Hangfire.Core/RecurringJobManager.cs 93.44% <100%> (ø) ⬆️
src/Hangfire.Core/Server/RecurringJobScheduler.cs 83.33% <80%> (-2.21%) ⬇️

@odinserj
Copy link
Member

odinserj commented May 29, 2017

Finally we'll get around all the problems with Cron. Almost all, seconds still aren't supported yet 😉 Merging this awesome PR!

@odinserj odinserj merged commit c8f1e9c into HangfireIO:dev May 29, 2017
@patnolan
Copy link

patnolan commented Jun 5, 2017

Can you provide any guidance around when seconds will be supported?

I'm trying to make a decision between Quartz.net and Hangfire but the main requirement is the support for a trigger with a 45sec interval.

@odinserj odinserj mentioned this pull request Jul 6, 2017
29 tasks
@tanushshukla
Copy link

Looks like 1.7.0 beta build is indeed using Cronos.

Thanks a lot! I'll be testing it out.

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

Successfully merging this pull request may close these issues.

None yet

5 participants