Umbraco-CMS
Umbraco-CMS copied to clipboard
Can't schedule a background task to run with a delay, or period, of 50 days or more.
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.4.1
Bug summary
IRecurringBackgroundJob
doesn't support TimeSpans of 4294967295 milliseconds or greater (about 49.7 days).
Specifics
I understand that this is a limitation of the underlying implementation of System.Threading.Timer, but I don't think that limitation should apply to Umbraco's scheduled tasks.
Steps to reproduce
- Create a new IRecurringBackgroundJob as per the docs: https://docs.umbraco.com/umbraco-cms/reference/scheduling#minimal-example
- Set the Period as follows:
public TimeSpan Period { get => TimeSpan.FromDays(50); }
Expected result / actual result
Umbraco Schedules a task for 50 days in the future.