How to run both Python scripts since the startup, launched from bash script on Raspberry Pi?

788 Views Asked by At

A pair of my Python scripts are,
pyserial.py
predict.py

My bash.sh looks like :

#!/bin/sh 
python3 path/pyserial.py & 
python3 path/predict.py &

To run the bash on startup I edited crontab as,
@reboot sh path/bash.sh &

But on startup, only pyserial.py runs. Surprisingly, if I run the bash script using terminal as,
sh path/bash.sh
then both run. But on startup only the pyserial.py runs. What can I do ?

0

There are 0 best solutions below