1

I have used Quartz.Net to schedule some jobs in my ASP.net Application. I am using default JobStore I think it is RAMJobStore but I am not sure exactly I only know I didn't config anything about Store.

Well the problem is that I want to store all jobs in DB so that I can run remaining jobs again when server resets or shutdown and start again .

I know I can store Jobs to DB using AdoJobStore but I want to know If my application server restarts and application not running in IIS how those remaining jobs can be triggered again ?

Is there any tutorial about this ? does anyone had some experience about triggering stored jobs after server reset ? any help would be appreciated

  • If you are using `AdoJobStore` you just need to start the scheduler again and thats it. – Najera Feb 06 '16 at 07:39
  • Well thanks for answer but my application is in iis and think iis has been reset by some admin or so , no one starts application by sending http request , is there any way to activate application again without human interference? – Mahyar Pasarzangene Feb 06 '16 at 07:52
  • Im not sure if this can help you http://stackoverflow.com/a/11142460/1486443 – Najera Feb 06 '16 at 08:05
  • 1
    Don't use ASP.NET for scheduling. You can develop Windows service or other application types. – Lex Li Feb 06 '16 at 09:48
  • "ASP.net Application." and "always running" to NOT mix...thus using ASP.net Application.for scheduling jobs..is a bad idea. Fortunately, you don't have to reinvent the wheel. https://github.com/quartznet/quartznet/tree/master/server/Quartz.Server – granadaCoder Feb 08 '16 at 19:50

1 Answers1

3

A. You will use AdoJobStore (as mentioned in comments).

B. You need to understand and tweak the "misfire" configuration. There is not a simple "yes" or "no" answer to this question.

http://royontechnology.blogspot.com/2009/03/so-you-think-you-understand.html

Since quartz.net is a java port over, you can also find helpful information here

http://www.nurkiewicz.com/2012/04/quartz-scheduler-misfire-instructions.html

Here is a sample paragraph (in case that link dies in the future at some point)

Sometimes Quartz is not capable of running your job at the time when you desired. There are three reasons for that:

(1) all worker threads were busy running other jobs (probably with higher priority)

(2) the scheduler itself was down

(3) the job was scheduled with start time in the past (probably a coding error)

The second one "(2)" (in the above quote) is your scenario.

The then goes on to explain scenarios and options.

Things to internet-search if any of the articles disappear in the future.

java'ish

org.quartz.jobStore.misfireThreshold

c#

"So you think you understand misfireThreshold"

Community
  • 1
  • 1
granadaCoder
  • 26,328
  • 10
  • 113
  • 146