0

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

Gopi
  • 105
  • 1
  • 7
  • 24

5 Answers5

1

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

0

You expression is wrong, a job which run every 15 mn should look like this : 0 0/15 * * * ? *

Romain
  • 301
  • 2
  • 7
0

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
  • 149
  • 2
  • 11
  • Your comment is correct however there is also the option of a cron expression to do the same. – aled Nov 23 '18 at 01:49
0

You can try 0 0/15 * 1/1 * ? *. You can visit Cron Maker site to generate your cron expression.

0

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);    
  • The second options is a very complicated programmatic way of doing something the Poll scheduler does with a simple cron expression. – aled Nov 23 '18 at 01:48