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.
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