Shutting down a PC, Java can do it!
A tiny trick to shutdown/restart windows PC after a specific time.
Let's start the timer!
I think you're a bit happy now.Fine, you'll have to note that the maximum time that you can make your PC wait for shutdown is 10 years, if you want more than that..... nothing, simply go send a feedback to Microsoft about it, they can do if they wish to, but have a valid reason for the claim ;)
More..
r.exec("shutdown -l"); for logging off, you can also add timer for it, as usual. If you wish to abort system being shutdown then, r.exec("shutdown -a"); this prevents your system from being shutdown.
To turn off PC without warning, then r.exec("shutdown -s -p");
To hibernate a PC, then r.exec("shutdown -h"); you can also use timer for this, not only for this, for any shutdown related operation you want to perform, you can use this option.
No comments:
Post a Comment