How to run job every 15 mins using quartz in mule
How to configure corn expression to run the job every 15 mins. Configured below one in the code but it is not working
fp.cron.expr=0 15 0 ? * *
Can you please help on this
5 Answers How to run job every 15 mins using quartz in mule
You expression is wrong, a job which run every 15 mn should look like this :
0 0/15 * * * ? *
Romain 12 months ago
Quartz connector is deprecated. When scheduling tasks, it’s recommended that you instead use the Poll Scope. It has option for Fixed Frequency Scheduler and Cron schedular. With Fixed frequency you can choose time units in MILLISECONDS, SECONDS, MINUTES, HOURS and DAYS.
user3366906 12 months ago
You can try 0 0/15 * 1/1 * ? *. You can visit Cron Maker site to generate your cron expression.
ryananthonyandal 11 months ago
You can use the Poll Scheduler in this case and give the Cron scheduler expression as 0 0/15 * 1/1 * ? *
For reference --> https://docs.mulesoft.com/mule-user-guide/v/3.6/poll-schedulers
Kunal Gupta 11 months ago
Right expression is "0 0/15 * * * ?"
Visit https://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/crontriggers.html for further reference.
If the above expression is not working then you can also use a trigger like as below :
scheduler.Start(); IJobDetail job = JobBuilder.Create<JobName>().Build(); ITrigger trigger = TriggerBuilder.Create().StartNow().WithSimpleSchedule(x => x.WithIntervalInSeconds(15).RepeatForever()).Build(); scheduler.ScheduleJob(job, trigger);