Vishu Singhvi
Vishu Singhvi

Reputation: 415

Java Scheduler Quartz Cron Trigger Time Setting

I am using Quartz for Scheduling my job in java. I have used "CronTrigger" for setting my time. I want to fire my Job each day at 11:55 Pm in night. What should i write in the setCronExpression(" ") for having my Job Done. .??

What i thought of the Code is:---

CronTrigger trigger = new CronTrigger();
trigger.setName("runMeJob");
trigger.setCronExpression("0 55 23 * * ?");

Is the above code correct or should i do some modifications in it????

Upvotes: 3

Views: 9072

Answers (1)

d1e
d1e

Reputation: 6442

It would be: 0 55 23 1/1 * ? *

There is a nice website exactly for your case: CronMaker

CronMaker is a utility which helps you to build cron expressions. CronMaker uses Quartz open source scheduler. Generated expressions are based on Quartz cron format.

Upvotes: 11

Related Questions