The following are the override methos of ServiceBase:
protected override void OnContinue()
{
this.scheduler.ResumeAll();
}
protected override void OnPause()
{
this.scheduler.PauseAll();
}
protected override void OnStart(string[] args)
{
this.scheduler.Start();
this.log.Information("Se ha iniciado el servicio");
}
protected override void OnStop()
{
this.scheduler.Shutdown(false);<----WHEN STOPPING THE
SERVICE SHOULD CANCEL ALL THE THREADS!!!!
this.log.Information("Se ha detenido el servicio");
}
But the problem is that when stopping the service, it waits for al
services to finish!!!
yes, it tries to shut down gracefully letting the current running jobs finish. but it won't start any new jobs.
--To view this discussion on the web visit https://groups.google.com/d/msg/quartznet/-/HuOK-a7nuEQJ.
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To post to this group, send email to quar...@googlegroups.com.
To unsubscribe from this group, send email to quartznet+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/quartznet?hl=en.
properties["quartz.threadPool.makeThreadsDaemons"] = "true";
Which will effectively kill thread pool threads sooner. Another option
is to implement IInterruptableJob which allows faster termination of
your jobs (if implemented correctly).
-Marko
> --
> You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
Not sure if this entirely addresses your problem but you may have a job thread that is blocking the main service from shutting down.
Best Regards,
Mark Gillen
> --
> You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/quartznet/-/J8HGEoR9sLEJ.
-Marko