Quartz Job doesn't fire

435 views
Skip to first unread message

PLad

unread,
Mar 15, 2012, 3:31:05 PM3/15/12
to Quartz.NET
Hello All,

I have scheduled couple of jobs with different CROn expressions. The
first job in the list below runs fine, twice, once at the top of the
hour and at 35 but the second one just doesn't seem to run. Here's my
quartz_jobs.xml. The second job is supposed to run daily at 11:00 AM.
Is my Cron-expression for the second job, right? Can you also please
let me know what I am doing wrong in scheduling the second job that is
making it not run at all? There are no errors in my log4net logs and I
have set it to DEBUG. There are no messages in the eventvwr. It just
doesn't kick off the 2nd job..

Thanks!
-PLad

<?xml version="1.0" encoding="UTF-8"?>
<quartz xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0"
overwrite-existing-jobs="false">

<job>
<job-detail>
<name>SPTIntegration</name>
<group>Integration</group>
<description>Run SPT Integration</description>
<job-type>Quartz.Job.NativeJob, Quartz</job-type>
<volatile>true</volatile>
<durable>false</durable>
<recover>false</recover>
<job-data-map>
<entry>
<key>command</key>
<value>"D:\siteroot\SPT\bin\SPTIntegration.exe"</value>
</entry>
<entry>
<key>waitForProcess</key>
<value>true</value>
</entry>
<entry>
<key>consumeStreams</key>
<value>true</value>
</entry>
</job-data-map>
</job-detail>
<trigger>
<cron>
<name>SPTIntegrationTrigger</name>
<group>Integration</group>
<description>Trigger SPTIntegration</description>
<misfire-instruction>SmartPolicy</misfire-instruction>
<volatile>true</volatile>
<job-name>SPTIntegration</job-name>
<job-group>Integration</job-group>
<cron-expression>0 0/30 * * * ?</cron-expression>
</cron>
</trigger>
</job>
<job>
<job-detail>
<name>UsersIntegration</name>
<group>UsersIntegration</group>
<description>Run Users Integration</description>
<job-type>Quartz.Job.NativeJob, Quartz</job-type>
<volatile>true</volatile>
<durable>false</durable>
<recover>false</recover>
<job-data-map>
<entry>
<key>command</key>
<value>"D:\siteroot\Users\bin\UsersIntegration.exe</value>
</entry>
<entry>
<key>waitForProcess</key>
<value>true</value>
</entry>
<entry>
<key>consumeStreams</key>
<value>true</value>
</entry>
</job-data-map>
</job-detail>
<trigger>
<cron>
<name>UsersIntegrationTrigger</name>
<group>UsersIntegration</group>
<description>Trigger UsersIntegration</description>
<misfire-instruction>SmartPolicy</misfire-instruction>
<volatile>true</volatile>
<job-name>UsersIntegration</job-name>
<job-group>UsersIntegration</job-group>
<cron-expression>0 0 11 1/1 * ? *</cron-expression>
</cron>
</trigger>
</job>
</quartz>

Nuno Maia

unread,
Mar 18, 2012, 8:04:55 AM3/18/12
to quar...@googlegroups.com
For the second trigger, use a cron expression like this 0 0 11 ? * *

> --
> You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
> To post to this group, send email to quar...@googlegroups.com.
> To unsubscribe from this group, send email to quartznet+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/quartznet?hl=en.
>

Ramarao Prahalad

unread,
Mar 19, 2012, 2:19:01 PM3/19/12
to quar...@googlegroups.com
Thanks!


This email (and any attachments) is the property of XO Group Inc. or one of its subsidiaries. It is intended only for the person(s) to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Distribution or copying of this email or the information contained herein by anyone other than the intended recipient(s) is strictly prohibited. If you are not an intended recipient and have received this email in error, please notify the sender immediately by replying to this email and destroy all electronic and paper copies of this message.

Ramarao Prahalad

unread,
Mar 23, 2012, 12:35:02 PM3/23/12
to quar...@googlegroups.com
Hello All, we moved to a new environment and I am having the same issue as below: The second job doesn't run. If there is a console app already running in an environment and we deploy another and append a <Job></Job> to the existing quartz_jobs.xml, are there any other steps I need to do other than Restarting the quartz service? It's the same xml file that runs fine in our DEV environment but we move it to QA with the additional job appended, the second job just doesn't run. My Cron expression is correct and permissions are all correct. Nothing gets logged in the logs and the second exe just doesn't run.

It's almost like the original configuration xml (quartz_jobs.xml) is cached and it just doesn't take my appended changes. Any ideas why?

Thanks in advance!
-Ram

-----Original Message-----
From: quar...@googlegroups.com [mailto:quar...@googlegroups.com] On Behalf Of Nuno Maia
Sent: Sunday, March 18, 2012 7:05 AM
To: quar...@googlegroups.com
Subject: Re: [quartznet:2953] Quartz Job doesn't fire

Mark Gillen

unread,
Mar 23, 2012, 12:53:33 PM3/23/12
to quar...@googlegroups.com
Hi Ram,

If you have your logging turned on - can you tell if the Job XML file is being parsed correctly? Also check your CRON trigger cron-expression - here's a good site - http://www.cronmaker.com/ just to be sure.

Best Regards,
Mark Gillen

Ramarao Prahalad

unread,
Mar 23, 2012, 1:20:56 PM3/23/12
to quar...@googlegroups.com
Thanks so much for your quick response. I changed the log4net level to debug and I could see very clearly what my error was. Plus, I had not increased the threadcount to 2:-). I so appreciate your response.. Thanks

Ramarao Prahalad

unread,
Mar 26, 2012, 11:57:37 AM3/26/12
to quar...@googlegroups.com
I am just having this one issue to contend with. For some reason, the Quartz executes my .exe and does not terminate the .exe. There are no errors as far as I can see from within my app as I have elaborate logging mechanism. My app's log file records no errors. Quartz log shows this as the last entry

2012-03-26 10:35:00,011 [CommerceScheduler_Worker-2] INFO Quartz.Job.NativeJob [RunNativeCommand(0)] - About to run cmd.exe /C "D:\siteroot\ConsoleApplications\Partner.exe "...

But If I open up task manager, my .exe that usually takes just 3 -4 minutes to run just continues to run.

Here's my Quartz config: I changed the threadcount value from "1" to 2 Thanks in advance!

--Ram

<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="D:\\siteroot\\ia_logs\\QuartzServerLog.log" />
<appendToFile value="true" />
<datePattern value="yyyyMMdd" />
<rollingStyle value="Date" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="5MB" />
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%method(%line)] - %message %exception%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>

<quartz>
<add key="quartz.scheduler.instanceName" value="CommerceScheduler" />
<!-- Configure Thread Pool -->
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="1" />
<add key="quartz.threadPool.threadPriority" value="Normal" /> <!-- Configure Job Store -->
<add key="quartz.jobStore.misfireThreshold" value="60000" />
<add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz" />
<add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.JobInitializationPlugin, Quartz" />
<add key="quartz.plugin.xml.fileNames" value="~/quartz_jobs.xml" />
</quartz>

-----Original Message-----
From: Ramarao Prahalad
Sent: Friday, March 23, 2012 11:32 AM
To: quar...@googlegroups.com
Subject: RE: [quartznet:2953] Quartz Job doesn't fire

Hello All, we moved to a new environment and I am having the same issue as below: The second job doesn't run. If there is a console app already running in an environment and we deploy another and append a <Job></Job> to the existing quartz_jobs.xml, are there any other steps I need to do other than Restarting the quartz service? It's the same xml file that runs fine in our DEV environment but we move it to QA with the additional job appended, the second job just doesn't run. My Cron expression is correct and permissions are all correct. Nothing gets logged in the logs and the second exe just doesn't run.

It's almost like the original configuration xml (quartz_jobs.xml) is cached and it just doesn't take my appended changes. Any ideas why?

Thanks in advance!
-Ram

-----Original Message-----
From: quar...@googlegroups.com [mailto:quar...@googlegroups.com] On Behalf Of Nuno Maia
Sent: Sunday, March 18, 2012 7:05 AM
To: quar...@googlegroups.com
Subject: Re: [quartznet:2953] Quartz Job doesn't fire

Nuno Maia

unread,
Mar 27, 2012, 9:38:09 AM3/27/12
to quar...@googlegroups.com
Hi,

Quartz will not force the application shutdown, the application must
exit by it self. You can control waiting the termination by using the
job parameter "waitForProcess"

Ramarao Prahalad

unread,
Mar 27, 2012, 10:18:15 AM3/27/12
to quar...@googlegroups.com
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages