-2

I need to run my recurring job for every 90 seconds (1min. 30 seconds). What is the CRON expression for this. Is it possible to do this?

The below code is scheduled my job in every 2 minutes. But i want to schedule for every 90 seconds (1min. 30 seconds)

RecurringJob.AddOrUpdate("Send Alert", x => x.SendAlert(null), "* /2 * * * *");

1 Answers1

0

create one crontab entry that runs X every 3 minutes on the minutes (*/3 * * * *), and a second crontab entry that runs X every 3 minutes with an offset of 30 seconds (1/3 * * * * sleep 30 && command)

*/3 * * * * command
1/3 * * * * sleep 30 && command
  • Hi @Riccardo Venturini, Thanks for your help. I am new to CRON expression and hangfire. Could you please explain, how i am using your expression with hangfire? – jaffer hussain Apr 11 '22 at 10:36