skip to Main Content

I have sh script that works perfectly if you launch it by yourself. But when I try to put it to the crontab nothing happens. My cron schedule expressions is

21 20 * * * bash a.sh

And this sh script includes

cd /home/ubuntu/currencies_datas_get && python3 AAVEUSDT.py &
cd /home/ubuntu/currencies_datas_get && python3 ADAUSDT.py &
cd /home/ubuntu/currencies_datas_get && python3 APEUSDT.py &
cd /home/ubuntu/currencies_datas_get && python3 ATOMUSDT.py &

It suppose to launch these scripts along and it really works if you try to type bash a.sh to the ubuntu console

2

Answers


  1. I suggest to add full path to python3 in your script.

    Login or Signup to reply.
  2. Assuming a.sh is in $HOME, make your crontab

    21 20 * * * bash $HOME/a.sh

    Additionally, depending on where your python3 binary is located, you may need to specify its full path, i.e., /usr/bin/python3 in your script.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search