[SOLVED] Crontab not working as expected on Sundays

Rhodesia

New Member
Oct 22, 2024
5
2
3
I'm trying to implement a crontab using Crontab-e on Proxmox. It works successfully from Monday to Saturday, but doesn't work correctly on Sundays (Server doesn't shutdown)? Any ideas why? From what I've read this should work perfectly:

Bash:
# weekdays: suspend at 22:30 and wake up at 18:00
35  22 * * 1-4   /usr/sbin/rtcwake -l -m off -t "$(date -d 'tomorrow 18:00' '+\%s')" >> /var/log/suspend-resume.log


# weekends: suspend at 23:05 and wake up at 11:30
05  23 * * 5-6   /usr/sbin/rtcwake -l -m off -t "$(date -d 'tomorrow 11:30' '+\%s')" >> /var/log/suspend-resume.log


# sundays: suspend at 22:30 and wake up at 18:00
35  22 * * 0   /usr/sbin/rtcwake -1 -m off -t "$(date -d 'tomorrow 18:00' '+\%s')" >> /var/log/suspend-resume.log

Edit: Just answered my own question, now that it's pasted here I see that sneaky 1 that looks like an l. Changing font on the forums works wonders!
 
Last edited: