1.

Solve : the at command for shutdown?

Answer»

I was trying to do the at 6:57PM /interactive "shutdown -s -t 120" and that won't work Please help!USAGE:
shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx SET timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [p]:xx:yy The reason code for the shutdown
x U is the user code
x p is a planned shutdown code
x xx is the major reason code (positive integer less than 256)
x yy is the minor reason code (positive integer less than 65536)I know
that
Maybe try using a 24-hour clock? Like:
Code: [Select]at 18:57 /interactive "shutdown -s -t 120"If that still doesn't work then check the task scheduler to see if the job is there, or check the System event logs to get more details on the failure.You must to remove the inverted commas.

This is what I have obtained:

C:\>at 6:57PM /interactive "shutdown -s -t 120"
Se ha agregado UN nuevo trabajo con identificador = 1

C:\>at 6:57PM /interactive shutdown -s -t 120
Se ha agregado un nuevo trabajo con identificador = 2

C:\>at
Estado ID Día Hora Línea de COMANDO
-------------------------------------------------------------------------------
1 Hoy 18:57 PM "shutdown -s -t 120" <-- ERROR !!!
2 Hoy 18:57 PM shutdown -s -t 120Quote

You must to remove the inverted commas.

This is what I have obtained:

C:\>at 6:57PM /interactive "shutdown -s -t 120"
Se ha agregado un nuevo trabajo con identificador = 1

C:\>at 6:57PM /interactive shutdown -s -t 120
Se ha agregado un nuevo trabajo con identificador = 2

C:\>at
Estado ID Día Hora Línea de comando
-------------------------------------------------------------------------------
1 Hoy 18:57 PM "shutdown -s -t 120" <-- ERROR !!!
2 Hoy 18:57 PM shutdown -s -t 120

That does not work because my computer does not actually go into shutdown


Quote
That does not work because my computer does not actually go into shutdown

So what does the computer do? The previous command posted is correct. Note: if the scheduled time has passed, the job is scheduled for tomorrow.

Just thought I'd throw that in.


Discussion

No Comment Found