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
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
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
You expression is wrong, a job which run every 15 mn should look like this : 0 0/15 * * * ? *
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.
You can try 0 0/15 * 1/1 * ? *. You can visit Cron Maker site to generate your cron expression.
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);