Question

I have created a scheduled job with Quartz that will run every minute. The job is created from following guide: http://geekswithblogs.net/TarunArora/archive/2012/11/17/quartz.net-writing-your-first-hello-world-job.aspx

The problem is that when the service is stopped and restarted the job is no longer in the scheduler.

How do I keep the scheduled job in the list?

Thanks for helping.

Was it helpful?

Solution

David F and bland helped me find the answer. I added my job in the XML file named quartz_jobs.xml.

<job>
    <name>MyJob</name>
    <group>MyGroup</group>
    <description>Job for MyJob</description>
    <job-type>ScheduledDownloader.DownloadJob, ScheduledDownloader</job-type>
    <durable>true</durable>
    <recover>false</recover>
</job>

<trigger>
    <cron>
        <name>MyJob</name>
        <group>MyGroup</group>
        <description>Cron trigger for MyJob</description>
        <job-name>MyJob</job-name>
        <job-group>MyGroup</job-group>
        <misfire-instruction>SmartPolicy</misfire-instruction>
        <cron-expression>0 0/1 * 1/1 * ? *</cron-expression>
    </cron>
</trigger>

Thanks again for the speedy help, it sure made my day.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top