I have a custom windows service, and I’d like to use Quartz .NET to schedule when the service runs. Now, I understand the basics of quartz.NET, but I’m not sure how I would hook it up to a windows service.. So, lets say i have Service.exe which I want to run every hour. How would I implement this functionality via Quartz? I know this is kind of a vague question, but there’s really no other way to ask it.
Thanks in advance.
You need to setup a job and a trigger. The job is called by a trigger.(http://quartznet.sourceforge.net/tutorial/lesson_3.html). Here’s an example running every hour.
Here is your class which calls Service.exe.
You could also just start a thread in a windows service, keep track of when you last fired the exe and then reset afterwards. It’s a bit simpler thatn Quartz, and would accomplish the same things. However, your question was Quartz specific.