Running Quartz job as Windows Service

658 views
Skip to first unread message

Marcin Garczyk

unread,
Mar 23, 2015, 2:08:35 AM3/23/15
to quar...@googlegroups.com
Hi Everyone,

I'm having a little hard time to understand how to run my custom created Quartz job as a Windows Service.

I've created a console application that's implementing the QUARTZ.Net classes

I've created Job and Trigger in the code.

            // Define the Job to be scheduled

           
var job = JobBuilder.Create<IntegrationJob>()

               
.WithIdentity("IntegrationJob", "IT")

               
.RequestRecovery()

               
.Build();
 

           
// Associate a trigger with the Job

           
var trigger = (ICronTrigger)TriggerBuilder.Create()

               
.WithIdentity("IntegrationJob", "IT")

               
.WithCronSchedule(quartzConfigSection["intervals"]) // visit http://www.cronmaker.com/ Queues the job every minute

               
.StartAt(DateTime.UtcNow)

               
.WithPriority(1)

               
.Build();


When I run it from Visual Studio it's running all good, but how do I make it run from a Windows Service??

I've created Windows Service as described in that page - http://geekswithblogs.net/TarunArora/archive/2012/11/16/install-quartz.net-as-a-windows-service-and-test-installation.aspx

I've copied all the Quartz files, I ran the Quartz.Server.exe install command and the service was created.

Now I have this whole bunch of files in my bin\Debug folder in VS. 

 

How to make that Windows Service pick up my SCRIMIntegration.dll and run it?? Do I need to specify it somehow in Quartz.Server.exe.config file?? Please help.

Regards.



Jay Vilalta

unread,
Mar 24, 2015, 12:52:46 PM3/24/15
to quar...@googlegroups.com
Put your dll in the same folder as quartz.server.exe. Then update the quartz_jobs.xml file and add your job and a trigger for it. Then start the service.

You could also see if these links help:
quick start guide: http://jayvilalta.com/blog/downloads/index.html
quartz.net tutorial: http://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/index.html

--
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To post to this group, send email to quar...@googlegroups.com.
Visit this group at http://groups.google.com/group/quartznet.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages