From cron to anacron
execute recurrent scripts with anacron to deal with missed jobs (system off)
I will follow these recommandations: https://askubuntu.com/a/235090
!mkdir -p ~/.anacron/{etc,spool}
anacrontab
Create a new file ~/.anacron/etc/anacrontab
with the following content:
# ~/.anacron/etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/explore/miniconda3/bin:/home/explore/miniconda3/condabin:/home/explore/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
# period delay job-identifier command
1 10 squeezebox ~/git/guillaume/squeezebox/generate_plots.sh
Add the following line to your crontab using crontab -e
:
@hourly /usr/sbin/anacron -s -t $HOME/.anacron/etc/anacrontab -S $HOME/.anacron/spool
And remove squeezebox entry from crontab.
!crontab -l