If I have a Quartz.NET trigger defined as follows:
SimpleTrigger fourPm = new SimpleTrigger(
"AutoExportTrigger",
null,
DateTime.Now.Date.AddHours(16),
null,
SimpleTrigger.RepeatIndefinitely,
TimeSpan.FromDays(1));
which should trigger every day at 4pm, but I’m wondering what happens if the web application is not running at the time of the trigger? I guess that Quartz.NET will have no knowledge of it as the trigger and job is defined in code.
If I am wrong, please could you explain where the state of jobs is stored. I’m finding it difficult to determine from the documentation. Thanks.
If the web application is not running when it’s time for the trigger to fire, it will not fire.
If you are using a database as the job store, the next time the application comes up, the trigger will be in misfire mode and may or may not fire, depending on the misfire instruction that was set for it.
If you did not specifically set the job store to be an ADO.net job store, then the scheduler is using a RAM store by default, which means that all your job information gets deleted whenever the web application is shutdown.