How can I set my computer to hibernate after, say 18000 seconds?
This doesn't work:
shutdown -h -t 18000
From the question: Hibernate computer from command line on Windows 7, Phoshi's answer does it:
The hibernation time for cannot be set, unfortunately.
This works, though.
ping -n 20 127.0.0.1 > NUL 2>&1 && shutdown /h /f
The ping is a hackish way of delaying the action. -n 20 should wait for 20 seconds.
(the double &&
will allow you to do a ctrl+c to cancel the operation, if you use a simple &
then ctl+c
will make to automatically shutdown after pressing)