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?