can I make raspberry pi run script then hibernate?

9
Found 20th Apr 2015
I've got a raspberry pi 2 and I've got a script that I want to run everyday using a cron job. But can I make the pi suspend itself after it has run the script, then start up at a certain time to run the script again, then suspend? And so on and so on.

You can do this with windows task scheduler, so I expect linux to be able to.
Community Updates
AskRunningRaspberry Pi
9 Comments
Any reason you need it to suspend?
The raspi only draws a few watts even at full load so I can't see it being worth it without your running from battery or solar power.
Original Poster
joedastudd

Any reason you need it to suspend?The raspi only draws a few watts even … Any reason you need it to suspend?The raspi only draws a few watts even at full load so I can't see it being worth it without your running from battery or solar power.



The script only runs once per day (could change in future). Pointless having it running 24/7 for 1 script.

Does anyone know how I can do this?
google scheduler for Linux, shouldn't be any different than normal distro
You could probably suspend it quite easily, waking it again will be the issue as the O/S wouldn't be running, so something would need to 'press' a key or other such wake up event.

I'd leave it running and find it another job to be doing while it's on, given how little power these things use.
The Raspberry Pi doesn't have a true sleep mode as far as I'm aware.
You can disable running tasks or attached devices, but aside from actually shutting down and having something power it back no there is no sleep mode.

Someone made this which uses an Arduino to power up the RasPi, but it costs as much as a RasPi.
If you wanted to I can't see a reason you couldn't make something similar yourself for a lot less.

tbh at 2w your looking at 0.032p/hour to run it (based on 16p/KwH) or 0.768p/day.
Even if you kit it out and get it up to 10w that's only 0.16p/h or 3.84p/day.
in$anity

Can be … Can be done:http://www.howtogeek.com/121241/how-to-make-your-linux-pc-wake-from-sleep-automatically/


Read up on it, the RasPi doesn't support that (well didn't for the B+, not 100% sure about the latest version).
Nou cannot shut it down. You will need it to be powered on and active to run scheduled tasks.try disabling services to conserve power/processor

B

in$anity

Can be … Can be done:http://www.howtogeek.com/121241/how-to-make-your-linux-pc-wake-from-sleep-automatically/



Not sure how this was the answer. It won't work with the Raspberry Pi
Post a comment
Avatar
@
    Text

    Top Discussions