What is the error output now then?
Your second script looks ok to me at a glance - except that you need to add a second ( " )
in your condition "rclone_cron.sh
I am too bad at bash to easily debug it for you lol, I think it is easier for me to just help you find what you need. Looks like this would be suitable for you?
if pidof -x $(basename $0) > /dev/null; then
for p in $(pidof -x $(basename $0)); do
if [ $p -ne $$ ]; then
echo "Script $0 is already running: exiting"
exit
fi
done
fi
Or otherwise I can tell you how to do a similar thing using lockfiles, because that is something I have made before. That would prevent more than 1 instance of any script to run at the same time. I assume that is your goal here...