These gist contains shell scripts to automate system sleep and wake on your machine running Debian linux (in my case DietPi).
until_tomorrow.sh
is a bash script using rtcwake
from the util-linux
package to make your (supported) system sleep "now" and wake-up at a specified time.
Run the following line:
curl -ssL 'https://gist.github.com/dchakro/571fe4d78219a9b4ff17690481c3afab/raw/add_cronjob.sh' | bash
As a bonus run the script add_cronjob.sh
to schedule your system suspend at a specific time.
Remember that the -m
parameter in rtcwake
can be tuned to your liking. e.g. you cou use -m disk
to suspend to disk for most power efficiency or use -m standby
for most responsiveness.
More info can be found on this blog (not a sponsor).