You are not logged in.

#1 2012-01-26 23:36:38

mathmare
Member
Registered: 2012-01-21
Posts: 14

Suspend to RAM at Midnight, and Resume at 6AM

How can I make my computer automatically suspend to ram at midnight, and resume at 6AM?

Offline

#2 2012-01-26 23:43:07

B-80
Member
Registered: 2010-05-05
Posts: 47

Re: Suspend to RAM at Midnight, and Resume at 6AM

A shell script using rtcwake should do the trick. Check out the Man pages.

Offline

#3 2012-01-26 23:50:28

mathmare
Member
Registered: 2012-01-21
Posts: 14

Re: Suspend to RAM at Midnight, and Resume at 6AM

rtcwake looks good, but how do I get it to reset after each wake?

Offline

#4 2012-01-27 00:51:19

B-80
Member
Registered: 2010-05-05
Posts: 47

Re: Suspend to RAM at Midnight, and Resume at 6AM

mathmare wrote:

rtcwake looks good, but how do I get it to reset after each wake?

Reset? You mean to run again the next day? There are plenty of ways, the fasted and easiest is a continuously running shell script something like:

rtcwake -s 21600
sleep 64800

Then run it at midnight tonight (or write another script to do that for you if you want it to be more exact) with

nohup mysleepscript.sh &

Like I said there are many ways to do this, but that's just the easiest IMO.

Offline

#5 2012-01-27 04:32:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: Suspend to RAM at Midnight, and Resume at 6AM

... Or start it with a cron job at midnight


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB