I'm trying to run
rtcwake from crontab using this command:
0 2 * * * /usr/sbin/rtcwake -u -m disk -t $(date +\%s -d 'today 0730') >> /tmp/rtcwake.log 2>&1
So, as you can see from this command, I'm telling the cron job to execute rtcwake at 2am every day and for rtcwake to wake itself at 7.30am the same day using local time (I'm running the cron job from the root account)
This is not working unfortunately, I get this message from the log:
rtcwake: wakeup from "disk" using /dev/rtc0 at Fri Sep 1 06:30:00 2017 rtcwake: write error
Could someone explain what I need to do, I thought running this from the
root account would solve any permission errors or could this be a space issue (albeit, i have 7tb of space but maybe the drive is too small)?
Note: If, as root, I run the
rtcwake command itself for a shorter period, it works fine, even from the cron.
I'm running 16.04 ubuntu server.