Umbraco-CMS icon indicating copy to clipboard operation
Umbraco-CMS copied to clipboard

Can't schedule a background task to run with a delay, or period, of 50 days or more.

Open JasonElkin opened this issue 6 months ago • 3 comments

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

  1. Create a new IRecurringBackgroundJob as per the docs: https://docs.umbraco.com/umbraco-cms/reference/scheduling#minimal-example
  2. 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.

JasonElkin avatar Aug 20 '24 15:08 JasonElkin