Skip to content

Instantly share code, notes, and snippets.

@jseabold
Last active December 19, 2015 20:58
Show Gist options
  • Select an option

  • Save jseabold/6016508 to your computer and use it in GitHub Desktop.

Select an option

Save jseabold/6016508 to your computer and use it in GitHub Desktop.
Use rtcwake to sleep immediately and wake up in 23 hours (to do some stuff for an hour). Intended to be called from cron.
#!/bin/bash
DATE=`date -d "now + 23 hour + 0 min + 0 sec" +%s`
rtcwake -lv -m disk -t $DATE
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment