How can I cancel an already running script?

Eon264

Beta member
Messages
2
Location
Ontario, Canada
Hi, I'm at the beginner end of the spectrum on programming or coding or software so bear with me. I have a script (not even sure it qualifies as that) I made to shut my computer down an hour after I activate it (the script, not the laptop). It works perfectly fine, except if my laptop runs out of battery before the hour's over, it will hold it's place on the countdown and restart when I turn my computer back on. This is fairly annoying, because it normally leaves me with 5-10 minutes of not being able to really do anything. This is the script... prepare to have your minds blown :silly:

shutdown.exe -s -t 3600

It's just written in notepad and saved as a ".bat", is there something I can add or another script I can make to stop this one? Maybe somewhere I can go to cancel the process?

Thanks in advance
 
Well, the reason when you boot it back up it continues the countdown is because the computer's not shutting down because of low battery, it's going to sleep. In sleep, it preserves the contents of the RAM so it can be brought back when it wakes up.

You could just tell your computer to shut down completely when the battery reaches a certain level instead of it going to sleep or hibernating.

Edit: Why not just replace the "3600" with "0", and run it when you want to shut down?
 
Well, the reason when you boot it back up it continues the countdown is because the computer's not shutting down because of low battery, it's going to sleep. In sleep, it preserves the contents of the RAM so it can be brought back when it wakes up.

You could just tell your computer to shut down completely when the battery reaches a certain level instead of it going to sleep or hibernating.

Edit: Why not just replace the "3600" with "0", and run it when you want to shut down?

I normally use it when I'm trying to sleep and I want to listen to music, but I don't want my laptop to be on all night. Thanks for the idea though.

carnageX said:
To cancel the shutdown timer, run:

shutdown -a

Thank you very much, That's going to save me some hassle :D
 
Back
Top Bottom