HangfireIO / HangfireIO/Hangfire.Azure.ServiceBusQueue

Cancel All Outstanding Recurring Jobs

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
59
Forks
34
PR merge metrics
No merged PRs in 30d

Description

I'm using this nuget package in one of my websites, and it works great. So thanks for spending the time making this.

I have a question/query regarding RecurringJobs and app restarts/app pool recycles... I have the following code which adds a couple of cron jobs on app start.

`RecurringJob.AddOrUpdate(() => new RecurringTasksService().DoSomething(), Cron.HourInterval(2));`

Again they work great. However...

I was thinking what about app restarts? What happens to these recurring jobs when the app restarts (i.e. config changes, new code pushed to live etc...)... is the same job added again? Is the old job cancelled on app shutdown? I'm just concerned over time I'll end up with X times of the same recurring job.

So instead of working every 2 hours, because of the constant adding of the job on app start it's firing all the time...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.