Issues deploying a Scheduled Task through GPO
Here, you have screenshot only of the General tab, while Triggers and Actions are more important. My guess is that you might be missing either the Recur every n days or Arguments for shutdown
.
My similar, working GPO seems identical for the General settings, but I use GPO for shutdown and BIOS scheduler start for startup, since the goal is to shut them down for night and power them up early to get all the updates installed before the users arrive – these are computer classrooms.
Triggers
1. Daily
Stop task if it runs longer than
30 minutes
Activate [datetime]
Enabled Yes
Recur every 1 days
Actions
1. Start a program
Program/script shutdown
Arguments -s -t 300 -f
My arguments are trying to be as user friendly as they can, considering the needs:
- Unless you have
-f
any unsaved data would cause the shutdown to abort. In this classroom case the computers needs to be freshly started in the morning, so it's ok, but be aware that this may cause losing data on employee workstations. -t 300
warns the user 5 minutes before shutdown, to give time to save data. Useful with-f
.-s
causes halt after shutdown, since I use BIOS or Wake-on-LAN for rebooting later. In your case you'd probably like to use-r
for reboot, instead.
Also double check that you schedule the reboots when there isn't any installations or backups running as interrupting those may cause severe problems.
Related videos on Youtube
Cheesus Crust
A major PC gaming nerd with some programming knowledge and aspirations to becoming a Systems Administrator. Still a newbie, but doing what I can to contribute back to the community!
Updated on September 18, 2022Comments
-
Cheesus Crust over 1 year
I am having trouble deploying a Task to all the workstations in my environment.
I am trying to setup a simple task that reboots at a specific time;
In my research on trying to accomplish this, I have created a basic task using
NT AUTHORITY\SYSTEM
as the user that applies this task.I am trying to make this run regardless if someone is logged in or not though.
What I have noticed
The GPO applies, but the task never runs.
I can only view the Task in Task Scheduler if I run as Admin, but not as the local user.
I also noticed that the Task file is present in
C:\Windows\System32\Tasks
.The task even has a "History" of running and succeeding (Much time in between) although I never saw it run.
My Environment
- Windows Server 2012R2
- Windows 10 workstation
Any help is appreciated.Thanks!
-
Cheesus Crust about 6 yearsI've added more images. Thank you for the details, though I cannot seem to find the problem looking for the things you mentioned.