Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quartz Cron expression :Run every 15 days ie twice in a month

I want to set the scheduler with a quartz cron expression which will trigger every 15 days ,for example 1st and 15th of every month.The 0 15 10 15 * ? is triggering only on 15th of every month.

like image 629
user3009116 Avatar asked Mar 24 '14 08:03

user3009116


1 Answers

I have tested this and the following expression works fine

        "0 0 0 1,15 * ?"

the 1,15 statement fires triggers on 1st and 15th of every month at 00:00 hours. You can change the first three zeroes to fire them at a particular time you want.

the 1st zero -> seconds

the 2nd zero -> minutes

the 3rd zero -> hours

like image 151
Pratik Roy Avatar answered Oct 20 '22 20:10

Pratik Roy