How to start a job every day at the same hour in Quartz.net?
Are your scheduled tasks hosted by web application? If so, you may experience such problems. Web applications are not suitable for running scheduled tasks. You should rather create windows service that hosts scheduled tasks.
But there are also some things you may check:
- Try using shorter period of time (i.e. check if this works if you set interval to 1 minute).
- Try CronTrigger - i'm using it in windows service and it works fine.
There are some articles that explain what are pros and cons of hosting scheduled tasks in web application, ie. this one: http://www.foliotek.com/devblog/running-a-scheduled-task/.
This answer has been asked 7 years ago and there is already accepted reply. But ti think throughout 7 years there has been a little bit changes so i would suggest this solution via CronScheduleBuilder.
//Constructing job trigger.
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("Test")
.WithSchedule(CronScheduleBuilder
.DailyAtHourAndMinute(16,40))
.WithSimpleSchedule(x=>x.WithIntervalInMinutes(number)
.WithRepeatCount(number)
.Build();
This code trigger job every day at particular time in this case 16:40. With interval number times and repeat count with number times