Reputation: 38488
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
Reputation: 35597
You can use two layers:
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