rtcwake in a cron job

Nils Kassube kassube at gmx.net
Fri Aug 2 04:33:39 UTC 2013


Phil wrote:
> Thank you for reading this.
> 
> I'm attempting to wake my computer from hibernation when a cron job is
> activated.
> 
> I've simplified the shell script as follows:
> 
> #!/bin/bash
> now=$(date +%s)
> rtcwake -m no -t now

That last line should be:

rtcwake -m no -t $now

But I doubt that it would work. AIUI, there are no processes running, 
while the machine is suspended and therefore you can't use cron to wake 
up the machine. Instead you should schedule a wakeup time before you 
suspend the machine.


Nils





More information about the ubuntu-users mailing list