Run script on startup with Cron on ubilinux 4.9.45
hello,
I would to run python script after each start of my UP Board. For that, i used cron to do it.
In my crontab i wrote this :
@reboot sleep 90 && /usr/bin/python3.5 /usr/bin/myScriptPython.py
The problem is that my script does not always run, after starting of my UP Board.
So can you help me please ?
Comments
-
Just for your reference, You are using ubilinux based on debian Stretch, which is not supported anymore.
In general to do that I would suggest you to use a init script to do that.
In case of ubilinux you are still using the SystemV init.
If you would move to a newer distribution/system you can take care of that using a systemd service -
@DCleri said:
Just for your reference, You are using ubilinux based on debian Stretch, which is not supported anymore.In general to do that I would suggest you to use a init script to do that.
In case of ubilinux you are still using the SystemV init.
If you would move to a newer distribution/system you can take care of that using a systemd serviceThanks for your answer.
Can you please give me a link to a tutorial that uses init script ?
Thanks a lot
-
After checking again also Ubilinux uses Systemd, so you can refer to the following on how to start a script/application at startup:
https://askubuntu.com/questions/919054/how-do-i-run-a-single-command-at-startup-using-systemd