Hi,
Am having a couple of issues getting HA to execute a cron job, and hoping a fresh set of eyes can point me in the direction as to why.
-
Firstly, whenever I reboot HA, the cron job gets removed from the crontab file. How do I stop this from happening ?
-
Secondly, I can’t actually get HA to run the cron job anyway.
In terms of setup, this is my HA install.
This is the code that I’ve added to the crontab file
*/15 * * * * run-parts /root/config/shell_scripts
This should run all/any shell scripts it finds in the shell_scripts folder every 15 minutes, although it doesn’t (it never runs at all). If I change it to the below (which should be another way of running the script), that also doesn’t work.
*/15 * * * * /bin/sh /root/config/shell_scripts/update_audio_choices.sh
I’ve checked the .sh script has correct executable settings, and can be run locally from that folder
Issuing “crontab -l” shows that the line(s) have been entered correctly, so am at a loss as to why they’re not running.
Does anyone have any ideas what I’m doing wrong ?