Deployed script task runs repeatedly

I created a script task to remotely restart thin clients which i have been running for 2-3 months. In the last week or so I have found that when I deploy this script task to a device that the device restarts but then continues to restart even though the schedule of the task is set to 'Once before [Date\Time]. Previously, the device would restart just once. The only way to stop the device from continually rebooting is to delete the deployment once it has run.

isiii3pkwyoy.png

Restart script:-
@echo off
shutdown -r -f -t 0

Comments

  • A couple of things to check:

    Is the clock on the destination computer set correctly? If the clock was set way ahead of the actual time, that could be one explanation.

    The OptiTune agent will store the time when it last ran the task in the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Bravura\OptiTune\ServiceClient\TaskTimes

    Take a look in this registry key, and see if your task's last run time is being stored there. To find the ID of the task, look at the configuration for the computer at https://manage.opti-tune.com/console/diag/computer-config.aspx

    For debugging purposes, you could change the script to not restart, just ECHO some text to the console. If something else is interfering with this registry key (e.g. a backup program that runs when the computer boots up and restores data), that could also explain it.

    Finally, in the computer details page, try running the "Restart" task under the "Favorite Tasks" section. If it continually reboots, you can also delete the deployment of the System task. OptiTune has the concept of System Tasks, like restarting the computer, shutting down, putting the computer to sleep, etc.... But, likely it is either the clock, or something interfering with the above registry key.

  • The cause of the issue is the write-filter on the thin clients is preventing OptiTune from updating this registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Bravura\OptiTune\ServiceClient\TaskTimes. I have modified the write filter to make this key writable and the script tasks now run once as expected. Thanks for identifying the key.
Sign In or Register to comment.