System.ArgumentException: 'Value does not fall within the expected range.' I get this exception when I change time trigger number from 15 to some other number.. I do know why.. I do not get exception when the time trigger is 15.. Why? Thanks in advance.. Here is the code..
var builder = new BackgroundTaskBuilder();
builder.Name = "My Background Trigger";
builder.SetTrigger(new TimeTrigger(5, false));
// Do not set builder.TaskEntryPoint for in-process background tasks
// Here we register the task and work will start based on the time trigger.
BackgroundTaskRegistration task = builder.Register();
The TimeTrigger Class has a minimum value which is 15 minutes. You could not set a time interval that less than 15 minutes to the TimeTrigger. This is mentioned here: TimeTrigger.FreshnessTime Property