Ufuk Hacıoğulları
Ufuk Hacıoğulları

Reputation: 38488

Is it possible to trigger and run jobs from different processes with AdoJobStore?

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?

Upvotes: 1

Views: 328

Answers (1)

LeftyX
LeftyX

Reputation: 35597

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.

Upvotes: 2

Related Questions