Recurring Job every X minutes

How do I make a job run every X number of minutes?

I’ve been researching cron expressions and it doesn’t seem possible to do (which seems very strange). For example, on http://www.cronmaker.com/ if you enter 45 minutes it will run at the top of the hour and on the 45th minute of the hour.

Thanks in advance for your help.

Alex

Hi,

Use this cron expression “0/x * * * *” whre x - number of minutes. In your case it is “0/45 * * * *”
Do not use expressions from http://www.cronmaker.com/.
Hangfire use NCrontab. Reasearch this https://code.google.com/p/ncrontab/w/list

1 Like

i need to run job every day at 9AM and 5PM… Please help me on this…

RecurringJob.AddOrUpdate(() => methodname, “00 17 * * 1-7”);
RecurringJob.AddOrUpdate(() => methodname, “00 09 * * 1-7”);

the above code is not working…