Can I extend the timer on a delayed shutdown?

2

I have configured Windows 10 to automatically turn off at 22:00 through a scheduled task with shutdown /s /t 900, so I get a 15 minute warning before my computer turns off.

However, I sometimes find that at 22:00, I have something I'd like to still do before it completely shuts down. Currently, I just type shutdown /a in the Search box, which completely aborts it, but that means that I again need to manually shut it down.

Is there another command I can type between 21:45 and 22:00 which will not fully abort the shutdown, but merely delay it by a specified time?

Nzall

Posted 2017-11-06T21:07:11.053

Reputation: 2 585

Answers

1

It is good to know, that once a scheduled shutdown is in progress, you cannot change it unless you first abort.

This means two things.

If you know prior to 22:00 that you need more time, you can simply issue a shutdown /s /t <long value> and when the scheduled task runs, it will simply fail stating: A shutdown is already in progress. Please use shutdown /a to abort it.

You can create a batchfile that does shutdown /s /t 2700 to give you 45 minutes from the moment of clicking it, or manually run it. The time value can be anything you want.

If the time hits 22:00 and the shutdown is initiated, then you first need to stop the shutdown using shutdown /a before you can start a new one with a longer value, such as shutdown /s /t 1800 giving you 30 minutes from that moment.

Do note, depending on the windows version you're using, this shutdown time value can be huge. Only on Windows Server 2008 and earlier versions of windows, is the maximum time 600 seconds, aka 10 minutes. But on later versions, you can go high. Like 8 hours or more, if you want to. So in theory, if you calculate the exact time you want to end, even if it is like 5 hours before your task starts, you can already make it being ignored once.

LPChip

Posted 2017-11-06T21:07:11.053

Reputation: 42 190

To whoever downvoted, please explain to me why I deserved this downvote? My answer is correct and answers OP's question. – LPChip – 2017-11-06T22:03:50.680

0

Yes; you can abort the shutdown and restart it at your discretion (though there is no way to directly extend* the delay). You just need to search the web on "Windows CMD shutdown" to find your answer:

/a      Aborts a system shutdown. Effective only during the timeout period. To use /a, you must also use the /m option.

/m      \\<ComputerName> Specifies the target computer. Cannot be used with the /l option.

Whether this will work on a Scheduled Task may be problematic, though, if the credentials differ from your own. Also, /m may only be needed on a shutdown set by another PC.

DrMoishe Pippik

Posted 2017-11-06T21:07:11.053

Reputation: 13 291

I had to vote this down, because obviously you have not read the OP's question thoroughly. They ask if they can extend a deadline and they inform that they already know about aborting it. – LPChip – 2017-11-06T21:25:22.770

Also, you really do not need to use /m to abort a shutdown. Obviously that link is outdated. – LPChip – 2017-11-06T21:35:50.653

AGAIN, please read the question by OP. You're missing the point of why I downvoted your question. Also, as my answer points out, you can overrule the shutdown by issuing a longer shutdown prior to the other shutdown. So you do not need to abort the shutdown. – LPChip – 2017-11-06T22:03:23.473

@DrMoishePippik Then please add this to your answer. At the moment your answer looks like a comment as it doesn't fully answer the question. – DavidPostill – 2017-11-06T22:19:51.933