Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My project is made in the .NET5 environment Example: I have Quartz.NET schedule set with Cron and task sending emails, everything works in a short time frame. On the test server, I set a day interval - ultimately it will be weekly. Additionally, I configured Pools connected to the project with settings. Unfortunately, the Cron does not start the next day - what else should you pay attention to on the server?

What I have tried:

<pre lang="C#">q.AddJob<SendEmailQualityControlJob>(opts => opts.WithIdentity(jobKey));
                      
                          // Create a trigger for the job
                          q.AddTrigger(opts => opts
                       
                        .WithIdentity("SendEmailQualityControlJob-trigger").WithCronSchedule("00 00 10 ? * WED ").ForJob(jobKey).StartNow());


As per the recommendations below:

https://newbedev.com/quartz-net-scheduler-doesn-t-fire-jobs-triggers-once-deployed

https://www.py4u.net/discuss/1170832

Start Mode: AlwaysRunning Limit Interval (minutes): 0 Regular Time Interval (minutes): 0
Posted
Updated 15-Sep-21 23:04pm

1 solution

Your cron means every Wednesday at 10.
If you want it to run daily you can use "0 0 10 1/1 * ? *" or every weekday "0 0 10 ? * MON-FRI *"

I use cronmaker.com for fiddling around with cron expressions until they do what I want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900