Page 1 of 1

Crontab don't execute bash script at reboot

Posted: Fri May 13, 2022 8:43 am
by azahonero
Hi all,

I've encountered a problem trying to use crontab in my RPs. I have multiple python and c files that I achieved to make work, and I use a bash script to execute all of them in my desired order. The point is that I need this .sh to execute at boot, so I've installed crontab and try to use it to execute my bash script at boot. I checked that the bash script and all the other scripts work cause if I do:
sh /home/atreboot.sh
Which contain my sequence of executables, it all works. But in crontab I tried:

@reboot /bin/sh /home/atreboot.sh

@reboot sh /home/atreboot.sh

And it doesn't execute anything at boot. I've checked the permissions and everything has execute permission. The crontab service is enabled too. Any idea why this doesn't work?

Thank you all

Re: Crontab don't execute bash script at reboot

Posted: Thu Jun 02, 2022 8:31 am
by redpitaya
Sorry, we do not know why this is. Maybe ask also on some Linux forums.