Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8779729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:52:15+00:00 2026-06-13T19:52:15+00:00

I am using a cron trigger with misfire-instruction set to FireOnceNow in quartz.net-2.0 set

  • 0

I am using a cron trigger with misfire-instruction set to FireOnceNow in quartz.net-2.0 set up with AdoJobStore and using XMLSchedulingDataProcessorPlugin.

cron-expression is set so the job will trigger every 1 minute: 0 0/1 * * * ?.

The job scheduler is set to start in Global.asax.cs.

Expected behaviour: If the server is stopped when a job should trigger but it is restarted before the next trigger then it should trigger once immediately.

Example:

First job triggers at 00:01:00.

I stop the server before 00:02:00 can trigger but start it a few seconds after it should, let’s say 00:02:10.

When I restart the server (at 00:02:10) I would expect for the job that misfired at 00:02:00 would fire once and then normal trigger behavior would continue.

What really happens is that nothing triggers. It just continues triggering from 00:03:00.

Any ideas what I have to do to make it work as expected?

Thanks for your help!

@Global.asax.cs:

private IScheduler scheduler;

protected void Application_Start(object sender, EventArgs e)
{
    var factory = new StdSchedulerFactory();
    scheduler = factory.GetScheduler();
    scheduler.Start();
}

@quartz_jobs.xml:

<?xml version="1.0" encoding="UTF-8"?>
<job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     version="2.0">
  <processing-directives>
    <overwrite-existing-data>true</overwrite-existing-data>
  </processing-directives>
  <schedule>
    <job>
      <name>TestJob</name>
      <group>Default</group>
      <job-type>BO.TestJob, BO</job-type>
      <durable>true</durable>
      <recover>true</recover>
    </job>
    <trigger>
      <cron>
        <name>TestCron</name>
        <group>Default</group>
        <job-name>TestJob</job-name>
        <job-group>Default</job-group>
        <misfire-instruction>FireOnceNow</misfire-instruction>
        <cron-expression>0 0/1 * * * ?</cron-expression>
      </cron>
    </trigger>
  </schedule>
</job-scheduling-data>

@web.config:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="log4net.Internal.Debug" value="false"/>
  </appSettings>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
        <arg key="configType" value="INLINE"/>
        <arg key="configFile" value="Trace/application.log.txt"/>
        <arg key="level" value="ALL" />
      </factoryAdapter>
    </logging>
  </common>
  <log4net>
    <appender name="GeneralLog" type="log4net.Appender.RollingFileAppender">
      <file value="Trace/application.log.txt"/>
      <appendToFile value="true"/>
      <maximumFileSize value="1024KB"/>
      <rollingStyle value="Size"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{HH:mm:ss} [%t] %-5p %c - %m%n"/>
      </layout>
    </appender>
    <root>
      <level value="ALL"/>
      <appender-ref ref="GeneralLog"/>
    </root>
  </log4net>
  <quartz>
    <add key="quartz.scheduler.instanceName" value="TestQuartzServer" />
    <add key="quartz.scheduler.instanceId" value="instance_one" />
    <add key="quartz.threadPool.threadCount" value="10" />
    <add key="quartz.threadPool.threadPriority" value="Normal" />
    <add key="quartz.jobStore.misfireThreshold" value="3000" />
    <add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" />
    <add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" />
    <add key="quartz.jobStore.useProperties" value="false" />
    <add key="quartz.jobStore.dataSource" value="default" />
    <add key="quartz.jobStore.tablePrefix" value="qrtz_" />
    <add key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.SimpleSemaphore, Quartz" />
    <add key="quartz.dataSource.default.connectionStringName" value="PostgreSqlDb" />
    <add key="quartz.dataSource.default.provider" value="Npgsql-20" />
    <add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz" />
    <add key="quartz.plugin.xml.fileNames" value="~/quartz_jobs.xml" />
    <add key="quartz.plugin.xml.scanInterval" value="10" />
  </quartz>
  <connectionStrings>
    <add name="PostgreSqlDb" connectionString="Server=localhost;database=quartz_net;User ID=*****;Password=*****;" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
</configuration>

@TestJob.cs:

using System;
using System.Diagnostics;
using Quartz;

namespace BO
{
    public class TestJob : IJob
    {
        public void Execute(IJobExecutionContext context)
        {
            Debug.WriteLine("@{0}: {1}", DateTime.Now, context.JobDetail.Key);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:52:16+00:00Added an answer on June 13, 2026 at 7:52 pm

    The problem was that the trigger data required for misfire action to work properly was overridden on each automatic processing of quartz_jobs.xml.

    So setting overwrite-existing-data to false was required for the trigger to work after misfire:

    <processing-directives>
      <overwrite-existing-data>false</overwrite-existing-data>
      <ignore-duplicates>true</ignore-duplicates>
    </processing-directives>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a problem with using cron trigger in Quartz.net. My code: var trigger
Started using Quartz.net in my project. But got stuck. Using cron trigger fires only
I am using a Quartz Cron trigger in my java program. The Cron expression
I am trying to create a job with quartz.net which will run every 45
I am using a cron job to change all pending net-banking orders to payment-pending
I am using Quartz.Net and I am trying to come up with a CRON
I'm using Quartz Scheduler v.1.8.0. How do I get the cron expression which was
I am using quartz scheduler to schedule my job. I have used CronTrigger. But
I want to call external urls using cron job of Google App Engine. And
I am using a cron job to get the users tweets etc and we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.