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

Recurring jobs with HangFire #115

Merged
merged 31 commits into from Jun 7, 2014
Merged

Recurring jobs with HangFire #115

merged 31 commits into from Jun 7, 2014

Conversation

odinserj
Copy link
Member

@odinserj odinserj commented Jun 4, 2014

Closes #62. Creating and running recurring job inside ASP.NET application is now as simple, as one line of code:

RecurringJob.AddOrUpdate(() => Console.WriteLine("This is awesome!"), Cron.Daily);

It uses the NCrontab library, so you can specify the schedule via CRON expressions:

RecurringJob.AddOrUpdate(() => Console.WriteLine("This is incredible!"), "0 12 * */2");

Recurring jobs are being created as regular background jobs, so you receive all other features of HangFire for free.

TODO:

  • Finish the scheduler class, add tests.
  • Add support for recurring job deletion.
  • Display recurring jobs in HangFire Monitor.
  • Handle JobLoadException
  • Do something with recurring ids

@odinserj odinserj added this to the v0.9.0 milestone Jun 4, 2014
@odinserj
Copy link
Member Author

odinserj commented Jun 7, 2014

2014-06-07 16 37 12

odinserj added a commit that referenced this pull request Jun 7, 2014
@odinserj odinserj merged commit 5ca9c84 into master Jun 7, 2014
@odinserj odinserj deleted the recurring-tasks branch June 7, 2014 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Recurring tasks support
1 participant