How do you name a scheduled task?

Soldato
Joined
6 May 2009
Posts
20,361
Is it possible to create a scheduled task through a .bat file that does not call it the default At1?


I have this at the moment

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

But some computers may already have a task called At1 which will be deleted.

I want something like that (this doesnt work though)


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



Thanks
 
I want to create a simple shutdown task that is named so it can be deleted again. Otherwise when you log off then back on another scheduled task is created At2 then At3...
 
Back
Top Bottom