Quartz.Net Trigger Scheduled Job On Demand
Is it possible for me to manually trigger this Job to run when I want it to?
Yes, you can trigger this job as and when you need.
Use void TriggerJob(JobKey jobKey)
method for this as below:
scheduler.TriggerJob(new Jobkey("MarkAsSolutionReminderJob"));
If you want to pass some data to the job while executing it on demand, you can also do that by just using another overload void TriggerJob(JobKey jobKey, JobDataMap data);
of the same method as below:
Dictionary<string, string> data = new Dictionary<string, string>();
//populate dictionary as per your needs
JobDataMap jobData = new JobDataMap(data);
scheduler.TriggerJob(new Jobkey("MarkAsSolutionReminderJob"),jobData);