Resume from suspend on automatic schedule ?

  • Hello,

    I have LE 8.2.5 running on an x86 machine. It is in suspend mode when not in use (I think S3).

    Is it possible to set a wake timer in order to resume from sleep automatically at the same time every day (eg 3am) ?

    I found reference to setwakeup.sh but I am not sure if it will suit my purpose nor how to use it.

    Thanks

  • If Your PC supports Wake On LAN then maybe Your router is capable to sen WOL command to it...

    On OPEN/DD-WRT and similar based routers You can use router to wake up WOL compatible devices...

  • If Your PC supports Wake On LAN then maybe Your router is capable to sen WOL command to it...

    On OPEN/DD-WRT and similar based routers You can use router to wake up WOL compatible devices...

    My router is ISP locked-down but I do have an always-on Rpi with LE on same network so maybe I can send a schedule WOL packet from that. I was hoping not to involve other machines for simplicity/reliability reasons but I guess I can try something like that.

    Thanks

  • You could look at rtcwake which although is not in standard LE, it *might* be possible to just copy it from a Ubuntu or other X86 distribution.

    I've copied the file from Raspbian to a RPi3 LE system and it appears to run - so it's probably a standalone file requiring no extra libraries.

    However, I don't have an X86 LE machine to test it on.

  • You can use setwakeup.sh to set a resume time.

    Bash
    setwakeup.sh $(date +%s -d 23:59)

    i.e. set a wake time of today 23:59. Other times need some more today/tomorrow time calculations.

    A sleep/resume script (see /storage/.config/sleep.d/99-sample.power.x) is a good place to set the resume time.

  • You can use setwakeup.sh to set a resume time.

    Bash
    setwakeup.sh $(date +%s -d 23:59)

    i.e. set a wake time of today 23:59. Other times need some more today/tomorrow time calculations.

    Thanks, this certainly works. But it only wakes the machine once. I need to wake everyday at same time.