Solved How do I write a program to shutoff the computer?

December 11, 2013 at 15:20:37
Specs: Windows 8
I want to make a program that will check if is past 11 PM then check if the IP addresses of devices are off. If they are then the program will turn off the computer, but I don't know how.

See More: How do I write a program to shutoff the computer?

Report •

December 11, 2013 at 19:16:47
✔ Best Answer
I would recommend using "at" or "schtasks" to do the time analysis. The sched-server program then launches a batch at 11PM to ping a list of devices/clients, looking for unanimous consent or dormancy from all subjects. If there is activity, then the next step is up to you: keep pinging (every XX seconds) till the field is clear, or re-set another task for X amount of time later which will re-launch the batch. I apologize I can't give a "plug-and-play" answer without more detailed specs. Shutdowns, esp. forced, can be destructive, and are not to be taken lightly, so every aspect is critical. (How would you like if your last 6 hours of work evaporate due to a forced shutdown?)

Report •

December 11, 2013 at 21:46:04
Thank you. I never thought of me losing work! Something I have to change.

message edited by Krpouncy

Report •
Related Solutions

Ask Question