My Helper
My Helper

Reputation: 707

Scheduled run based on User chosen time on Windows 10 UWP

I have a requirement for the Windows 10 UWP app, where user can select a date and time and a task will be executed based on that. I tried this with TimeTrigger, however if the user selects a time which is less than 15 minutes from now it doesn't work as we need to provide at least 15 minutes for the TimeTrigger to run.

Any workaround or confirmation that it is not possible on Windows 10 would be much appreciated!

Upvotes: 0

Views: 243

Answers (1)

user2250152
user2250152

Reputation: 20635

If FreshnessTime is set to less than 15 minutes, an exception is thrown when attempting to register the background task. It is built-in behavior.

Another way can be using DispatcherTimer but I'm not sure if it is suitable in your case. It depends on requirements for your app.

Upvotes: 0

Related Questions