quartz scheduler - Is this Cron Trigger Expression valid? -


   public static itrigger fireeverydayatmidnight()     {         itrigger trigger = triggerbuilder.create()             .withidentity("trigger3", "group1")             .withcronschedule("0 02 01 * * ?")             .forjob("myjob", "group1")             .build();          return trigger;     } 

i have problem thoroughly understanding cron trigger expressions. intend schedule above trigger fire every day @ 2 minutes past midnight. want hear people more experienced cron expressions if expression above "0 02 01 * * ?", indeed run intended i.e run fire every day @ 2 minutes past midnight

the cron in trigger execute @ 02:00 on 1st of every month.

if wish execute @ 00:02 every day using 7 field quartz contrab format, use:

0 2 0 * * * * ? 

here's quick summary of how crons formed, snipped cron how on ubuntu's site:

each of sections separated space, final section having 1 or more spaces in it. no spaces allowed within sections 1-7, between them. sections 1-7 used indicate when , how want task executed. how cron job laid out:

second (0-59), minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = sunday), year (empty, 1970-2099) command.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -