I am testing a background example using script4, and it never calls Run, I follow the steps and what I see:
1.- After the call
BackgroundTaskRegistration task = builder.Register();
Task has Trigger = null
Should it be the trigger specified earlier in
builder.SetTrigger(trigger); ?
2.- In theory, when I register a background job, it should appear here EventViewer - BackgroundTaskInfrastructure, but it should not appear here?
3.- To try to debug I Debug Location - Pause the application, but after more than 15 minutes it never appears, it should be simple, how to pause and wait?
I also added inside the Run notification:
var toastXML = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText01); var toastTextElements = toastXML.GetElementsByTagName("text"); toastTextElements.First().AppendChild(toastXML.CreateTextNode("Hello World:")); var toastNotification = new ToastNotification(toastXML); toastNotification.ExpirationTime = DateTimeOffset.UtcNow.AddSeconds(30); ToastNotificationManager.CreateToastNotifier().Show(toastNotification);
But he never appears. How does BackgroundTask work with TimeTrigger?
source share