This is the content of root's crontab:
0 23 * * 0-4 /usr/sbin/rtcwake -time `date --date="+16 hours" +"%s"` -m mem
This is set to fire off that command every Sun-Thu at 11pm. The command is essentially a suspend for the next 16 hours while I'm at work to save power. I've test the command with smaller times (30, 60 seconds) and it works. However, when I wake up in the morning and check my machine, it's still running.
Here's what's in the logs:
Jul 24 23:00:01 gallactica CRON[5033]: (root) CMD (/usr/sbin/rtcwake -time `date --date="+16 hours" +")
So does this mean it ran? Why didn't it actually work?
%s
in the command has been mangled byprintf
in the log, and maybe in the actual command that was executed too to cause it to fail. – Michael Homer Jul 25 '14 at 10:45date
inside of a cron tab job? – steeldriver Jul 25 '14 at 10:51