Delayed Scheduled Task fails to run
Published Oct 14 2020 02:13 AM 6,383 Views
Hey there....
This is Phil here from the FSLogix Team.
I came across an issue recently which I thought I would share with you.
A customer reported that all the delayed scheduled tasks had stopped working . If they disabled FSLogix the Delayed Schedule Tasks would run after their configured delay.
Similarly if the user was logged onto 2 or more sessions then delayed scheduled tasks would only fail for the first session but would run for that user on the subsequent session.
After troubleshooting , we identified the cause was this value  being set: 



You can read more on what this setting does Here.

This setting impacts any Scheduled Task that has a delay set . They do not run.





This Policy is needed when using ODFC containers and when you are applying Office Registry settings via GPO.

The ODFC disk is attached during a later stage of the login, which effectively is after GPO has run. If you have set any registry keys to be applied via GPO  to HKCU\Software\Microsoft\Office\{App name} where App Name can be any of the Office Application suite then they may not be applied.

Setting this RefreshUserPolicy triggers the GPO to re-apply GPs.

As this process happens AFTER  logon ,  the "new" task misses the logon event and hence the delayed scheduled task does not get triggered. 


In summary:

1. Login
2. FSLogix loads the profile
3. Task gets updated by something other than FSLogix (screenshot below)
4. Start shell fires: FSLogix loads ODFC
5. if RefreshUserpolicy = 1, we refresh the policies and update the task again (same screenshot below) and this causes it to trigger,  probably because now that its updated, it needs another logon event to trigger it, but at this point we are too late.





There is no fix available as yet and the team are working on a fix for the next release.


In the meantime If you need to use the RefreshUserPolicy setting  to ensure that your Office Registry keys get applied and ALSO have delayed scheduled tasks,   you will need to remove the delay on the task and set that delay via a script.


If your delayed task executes an application or process then you will need to place that in a script wrapper and set the delay.


I tested creating  a non delayed task that itself does the wait (for example using powershell, sleep for 1 minute) instead of delaying it as part of a scheduled task and this works whilst allowing the use of the RefreshUserPolicy=1 setting.

sleep -Seconds 60
$wsh = New-Object -ComObject Wscript.Shell
$wsh.popup("Welcome ! from share with 1 min sleep")
results in the following 1 minute after logon:


Hope you find the above useful.


Until next time......

1 Comment
Version history
Last update:
‎Oct 14 2020 02:13 AM
Updated by: