Giter Club home page Giter Club logo

Comments (6)

alex-shamshurin avatar alex-shamshurin commented on July 23, 2024

Hey guys, February is coming, only 28 days. My jobs must be performed on the month's last day. Any ideas why it is not working?

from grails-quartz.

erichelgeson avatar erichelgeson commented on July 23, 2024

Can you provide some details on what is not working? looks fine to me:

cron name:'someTriggerName', startDelay:10000, cronExpression: "0 15 10 L * ?"
trigger.nextFireTime == Sun Jan 31 10:15:00 UTC 2016

http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger

from grails-quartz.

alex-shamshurin avatar alex-shamshurin commented on July 23, 2024

Not working if specify smth like '0 0 2 15,L * ?' . My task must run on 15th and on the last day of the month, that causes the error " Cron expression '0 0 2 15,L * ?' in the job class com.domainboost.RedistributeJob is not a valid cron expression"

from grails-quartz.

erichelgeson avatar erichelgeson commented on July 23, 2024

That is just an invalid quartz cron expression. You can not mix int and L.

A simple workaround is to create 2 cron triggers in your job with correct quartz cron syntax:

triggers {
    cron name:'midMonthTrigger',   cronExpression: "0 0 2 15 * ?"
    cron name:'endOfMonthTrigger', cronExpression: "0 0 2 L * ?"
}

You can validate its invalid by just using quartz CronTrigger builder without the plugin and getting the same error, also this site is useful http://www.cronmaker.com/

from grails-quartz.

alex-shamshurin avatar alex-shamshurin commented on July 23, 2024

Ok, thanks, I already created two jobs. BTW, how to debug quartz in integration test?

from grails-quartz.

kefirfromperm avatar kefirfromperm commented on July 23, 2024

Not a bug.

from grails-quartz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.