When I was using Linux Mint, I had the following cron job that would kick off every night at 10pm and use LuckyBackup to rsync my main mdadm array to a backup one. With EOS, I know I needed to install a cron app (I went with Cronie). I got that installed, enabled and started the service and LuckyBackup kicks off at 10pm and goes to work. No problem there.
Another thing I need, is for my system to do a reboot at 7:30am Mon, Tue, Wed, Thu, Fri, Sat. So I added the line from my Mint crontab right below the one for LuckyBackup but my system didn’t reboot at 7:30am this morning:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ luckybackup entries ~~~~~~~~~~~~~~~~~~> 0 22 * * * env DISPLAY=:0 /usr/bin/luckybackup --silent --skip-critical /h> # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ end of luckybackup entries ~~~~~~~~~~~~~~> 30 7 * * MON,TUE,WED,THU,FRI,SAT shutdown -r
What am I doing wrong? When I opened a terminal and typed ‘shutdown -r’, it restarted seconds later.
Hmmmm… I just remembered something… in Mint, the daily reboot line… it DID have a path in front of ‘shutdown’. Something like, /usr/sbin/shutdown … but in EOS, I think I popped open a terminal and didn’t find that path or shutdown wasn’t in there… SOMETHING made me change the line to just ‘shutdown’ and remove the path. Maybe this is why it failed?
I’m going to do some Googling to see how to write a SystemD service file that accomplishes the same, 6 day reboot.
As for the MDADM question… with Mint (and I think this is an MDADM thing and less of a Mint thing), the first Sunday of every month, MDADM does a consistency check on the array. I guess I’ll know soon enough but do I need to do anything special in EOS for that to happen or is my guess right that the check is just part of MDADM’s code and it will do it automatically no matter which distro I’m using? (That’s why I don’t reboot on any Sunday since I don’t want to disrupt the consistency check.)
EDIT: I think I want to stick with Cronie for this… for daily reboots ‘mon-sat’, would this go in the cron.daily folder or cron.weekly one?