Today I want to talk a little bit about the Windows Task Scheduler in Windows 365 Cloud PCs and how RDP Time zone redirection can result in interesting issues.
User complaint
How did this all started? Well a User complained, that his software that relied on the Windows Task Scheduler failed to schedule jobs on his CloudPC, while all worked fine on his laptop. All settings looked the same, so I tried to reproduce it on my CloudPC and to my surprise it actually didn’t work.
I created a simple Task:

With an scheduled time trigger around five min in the future:

and a simple action for a test:

And waited for the trigger to happen:

Just to see, once the time arrived, nothing happened and the tasks “Next Run Time” got empty:

Troubleshooting
Strange, just to be sure, I tried to manually run the task and just as expected it works fine:


Why does it work when manually started, but not via the trigger? Well after some searching on the internet, I found an reddit post mentioning that Windows 365 Machines run in UTC… Well but my machine tells me it’s running in CEST:

But does it actually? Well, kinda sorta maybe… I never configured a time zone on my CloudPC, it gets the time zone from the time zone redirection feature in the RDP Protocol: ADMX_TerminalServer Policy CSP | Microsoft Learn
If we run the same “Get-TimeZone” cmdlet as system, we can see the device is actually running in UTC:

Well, that could very well explain, why my task is never triggered… Can we test that? Well let me create a task that is scheduled 2h 5min in the past, and see if it gets triggered:

Well a few min later, even though the Task Scheduler UI had no clue that this task could ever be triggered, it started:

Workarounds
So now that we roughly understand what happened, what can we do against it?
sYNCHRONIZE across time zones Setting
Well you maybe already screamed at your screen, that there is a setting available in the trigger “Synchronize across time zones”, that could help:

And yes, absolutely it works:

There is just one minor problem with this solution… My user is not creating these tasks manually in the Task Scheduler, but he is using a business application, that leverages the Task Scheduler and has currently no way of enabling this setting in its template…
Configure the Time zone fROm Intune
Since I can’t really change the behavior of this App, why not change the time zone via Intune policy?


Set the Time Zone to CEST:

And assign it to a group of CloudPCs that should have this time zone set centrally:

Once the policy arrived on my CloudPC, I re-ran the test script from before and now it’s showing we are in CEST for the system account:

So let’s repeat our simple test task from before:

And not too surprising, the task now works as expected:

Conclusion
As you can see, time zones can cause interesting challenges, but as long as you are aware of it, it can be managed.
Leave a Reply