I have the following recurring job configured
RecurringJob.AddOrUpdate(“myGetRequestJob”, () => GetRequests(), Cron.Hourly);
But during debugging, the GetRequest static public method is executed every minute. I would like to execute the method every 5 minutes in every hour, regardless of day, month, week or year. I also tried the following Cron expressions “*/5 * * * *” but still to no avail.
Please assist, thanks!
Did you access the dashboard to see all running jobs? In my case there was an old job running and causing some errors in my environment, maybe it could be your case too.
Did you tried this code below to remove possible jobs with the same name?
RecurringJob.RemoveIfExists(“myGetRequestJob”);
I don’t have a dashboard, because I’m writing this as a console windows service.
I already deleted old job from the database.
Yes, I also called the RecurringJob.RemoveIfExists() method.