I have a Console Application that instantiates a Quartz Scheduler.
I would like a Job to raise an event Handler so that the “Mother App” calls a particular Method.
The problem is that the Job Class seems to be pretty isolated to the external classes apparently.
I am sure there is a good way to do this but I did not stumble upon it yet.
public class RestartJob : IJob
{
public RestartJob()
{
}
public virtual void Execute(IJobExecutionContext context)
{
//Send Restart EventHandler Subscription to Console.
}
}
I solved my problem by implementing a singleton on the class containing the Scheduler Logic.
Works a charm. Hope this could help other to solve what seems to me as a “Must-Have” feature.
Usage :