Closed Bykiev closed 2 years ago
As I'm using the OWIN, the correct way was using Register
delegeate:
var properties = new AppProperties(app.Properties);
var token = properties.OnAppDisposing;
if (token != System.Threading.CancellationToken.None)
{
token.Register(() =>
{
// shutdown here
})
}
Hi, we're using Quartz.NET in our ASP. NET Web API project. We're not calling
Shutdown
and because of this sometime after deploy old scheduler is still running along side with started new schduler. The correct way will be callingShutdown
onApplication_End
, but I can't get the instance of scheduler, here is an error:Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.
What is the correct way of getting scheduler instance here?