1

I am implementing a Windows service that's responsible for running the scheduler and executing the jobs. I want to trigger the jobs from a web application but since the web application does not run a scheduler I can't do anything with the triggers I build.

TriggerBuilder.Create()
              .WithIdentity(commandName,groupName)
              .ForJob(commandName)
              .StartNow()
              .Build();

How can I insert the trigger to the database so that the scheduler running in the Windows service can pick it up? Is this supported in Quartz.NET?

Ufuk Hacıoğulları
  • 37,978
  • 12
  • 114
  • 156
  • Possible duplicate of [this](http://stackoverflow.com/questions/26480787/get-an-instance-of-the-scheduler-that-is-being-run-on-a-windows-service/26482361#26482361) – Nick Patsaris May 06 '15 at 11:59

1 Answers1

2

You can use two layers:

  • your web application will be responsible to manage (insert/delete) jobs and trigger
  • your windows service will run the schedules

I've answered the same question long time ago but, I guess, the implementation is pretty much the same.

Both applications will share the same database where jobs and triggers are stored.

Your web application should never start the scheduler.

Community
  • 1
  • 1
LeftyX
  • 35,328
  • 21
  • 132
  • 193