Advertisement

Lock / shut down PC after certain times?

Started by May 11, 2010 06:48 AM
12 comments, last by Windryder 14 years, 6 months ago
Quote: Original post by way2lazy2care
Quote: Original post by SymLinked
Quote: Original post by Don Carnage
Just use task scheduler in Win7 to create a task to run when you want to go to sleep.

Use something like this as your task command:

shutdown /h /f

or

ping -n 20 127.0.0.1 > NUL 2>&1 & shutdown /h /f

if you want some grace time.


Or just use the built in shutdown timer...

shutdown -t 60


That'll shut down the computer in 60 seconds and you'll see a timer dialog.
But anyway. Why would anyone want a shutdown to happen? Losing all your hard work if it's forced while you're not there or if you can't react in time. I'd say there must be a better solution.


in windows 7 does the shutdown timer insta-shut down or is it the same as hitting the shutdown button? I think 7 holds the shutdown till your programs have a chance to save/you close all the dialogue boxes asking you to save.


But the OP requested a method of automatically hibernating, not shutting down, hence the /h switch. Also the timeout switch appears not to work with /h, hence the hack time delay.

Best solution is maybe write a little util yourself, then call that from task scheduler. In .Net the call to hibernate is

Application.SetSuspendState(PowerState.Hibernate, true, true);
It is I, the spectaculous Don Karnage! My bloodthirsty horde is on an intercept course with you. We will be shooting you and looting you in precisely... Ten minutes. Felicitations!
Quote: Original post by Moe
Better yet: Don't have a computer, TV, or any other distractions in your bedroom. Bedrooms are for sleeping, not computing or watching TV.

It really does come down to self control. If you can't go to bed on time, who is to say you are capable of other, bigger things that involve self control?


I don't have any of that in my bedroom. The only piece of electronics I have in my bedroom is my alarm clock. I only use my bedroom for sleeping.

And I currently have shutdown /h in my task scheduler. I never shutdown my laptop, always hibernate.

Advertisement

you need willpower, not computer account locks and shutdown task.

eventually if you break your self of using the computer at night, you'll form a habit of sleeping and fall asleep nearly the same time always.

or you could be like me and learn to sleep on a dimes notice :D
486ing for life

http://www.gearcity.info/
http://www.ventdev.com/
Or pick up a book, like this one. It has helped me sleep many, many times.

This topic is closed to new replies.

Advertisement