Schedule shutdown

Soldato
Joined
6 May 2009
Posts
20,400
How do i get this script to not duplicate everytime it runs. The script does work but on every login will create a new task instead of just using the same one

at 23:44 /interactive /every:M,T,W,Th,F,S,Su C:\WINDOWS\system32\shutdown.exe -s -t 10

(can be tested in the run box then opening scheduled tasks, but i guess you all know this anyway)
 
Thanks. Just what im looking for, no need to use shutdown programs or vb script that everyone else on the net has been trying to use :)

SCHTASKS /delete /TN At1 /F
at 23:44 /interactive /every:M,T,W,Th,F,S,Su C:\WINDOWS\system32\shutdown.exe -s -t 10

or just use * if there are no other tasks running
 
is there a way of making the

at 23:55 /interactive /every:M,T,W,Th,F,S,Su C:\WINDOWS\system32\shutdown.exe -s -t 10

part create the task with a specific name instead of At1? This way I could delete the specific task instead of any other tasks that have been created previously
 
I need to do it in a login script so it runs on 100 computers, not go onto each computer and create a scheduled task individually. Different times for different scripts too

SCHTASKS /delete /TN shutdown /F
at /shutdown 23:44 /interactive /every:M,T,W,Th,F,S,Su C:\WINDOWS\system32\shutdown.exe -s -t 10

This does not create a task called shutdown. Do you know how to make it create the task with the name shutdown (so then uplon login the shutdown will be deleted and created again)
Otherwise on each login at new task is created At1, At2, At3 etc
 
Back
Top Bottom