1

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();

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.