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 6993891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:49:19+00:00 2026-05-27T19:49:19+00:00

I’m using Quartz with Spring to run a specific task at midnight on the

  • 0

I’m using Quartz with Spring to run a specific task at midnight on the first day of the month. I have tested the job by setting my server date & time to be 11:59 on the last day of the month, starting the server and observing the task run when it turns to 12:00, but I’m concerned about cases where the server (for whatever reason) may not be running at midnight on the first of the month.

I’d assumed that misfire handling in Quartz would care for this, but maybe I’m mistaken on that?

Can anyone advise me on how I might be able to handle this? I’d really prefer not to create a job that runs every ‘x’ seconds/minutes/hours and check to see if I need to run the job if I can avoid it.

I’m also curious as to why I’m not seeing any Quartz related logging info, but that’s a secondary issue.

Here is my spring configuration for the task:

<bean id="schedulerService" class="com.bah.pams.service.scheduler.SchedulerService">
    <property name="surveyResponseDao" ref="surveyResponseDao"/>
    <property name="organizationDao" ref="organizationDao"/>
</bean>

<bean name="createSurveyResponsesJob" class="org.springframework.scheduling.quartz.JobDetailBean">
    <property name="jobClass" value="com.bah.pams.service.scheduler.jobs.CreateSurveyResponsesJob"/>
    <property name="jobDataAsMap">
        <map>
            <entry key="schedulerService" value-ref="schedulerService"/>
        </map>
    </property>
</bean>
<!-- Cron Trigger -->
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail" ref="createSurveyResponsesJob"/>
    <property name="cronExpression" value="0 0 0 1 * ? *"/>
    <!--if the server is down at midnight on 1st of month, run this job as soon as it starts up next -->
    <property name="misfireInstructionName" value="MISFIRE_INSTRUCTION_FIRE_ONCE_NOW"/>
</bean>

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">

    <property name="autoStartup" value="true"/>

    <property name="quartzProperties">
        <props>
            <prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
            <prop key="org.quartz.jobStore.misfireThreshold">60000</prop>
        </props>
    </property>
    <property name="jobDetails">
        <list>
            <ref bean="createSurveyResponsesJob"/>
        </list>
    </property>

    <property name="triggers">
        <list>
            <ref bean="cronTrigger"/>
        </list>
    </property>
</bean>
  • 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-05-27T19:49:19+00:00Added an answer on May 27, 2026 at 7:49 pm

    MISFIRE_INSTRUCTION_FIRE_ONCE_NOW is for the purpose you mentioned and if you suspect a shutdown of the server(s) you should definitely persist your jobs out of the JVM memory (ex: by using a JDBCJobStore instead of a RAMJobStore).

    RAMJobStore is fast and lightweight, but all scheduling information is lost when the process terminates.

    http://quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigRAMJobStore

    JDBCJobStore is used to store scheduling information (job, triggers and calendars) within a relational database.

    http://quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJobStoreTX

    Hope it help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

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.