Is it possible to make a shutdown timer?

Started by
3 comments, last by ToohrVyk 16 years, 10 months ago
Hi My brother asked me the other day if I could make him a program that could shudown his pc at work at an allotted time. Is this possible? Where can I get more info on how to do this? Ihave basic C++ knowledge so its probably not enough.
Advertisement
google for: "windows shutdown c++". You're feeling lucky.

as for the timing that's pretty simple. You just launch a process that intermittently checks the system time (again google). When the time is right execute the shutdown code.

Dangers of this system:

1) your brother stays late and is in the middle of doing something. He might lose saved data (though the apps should prompt him to save before quitting).
2) his work doesn't let him install 3rd party applications and he gets fired
3) etc

-me
Isn't this something windows Task Schedhuler can handle?
Quote:Original post by Vampyre_Dark
Isn't this something windows Task Schedhuler can handle?

Yep, we use it all the time. Shutdown.exe + task scheduler = timed shutdown :)
http://www.ss64.com/nt/shutdown.html

Steven Yau
[Blog] [Portfolio]

Windows provides the shutdown program, with a -t option. It may also be scheduled using the task scheduler. I would suggest a shutdown -t 120 two minutes before the closing time, with a shutdown -a shortcut somewhere nearby, in case you want to cancel it.

This topic is closed to new replies.

Advertisement