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
Categories
- 292 All Categories
- 104 Announcements & News
- 48 Product News - New Product/Product Change Notice/ End-of-life
- 181 Welcome Developers!
- 49 Unboxing & Project Sharing
- 20 Tech Updates
- 412 UP Products
- UP 4000
- 12 UP Xtreme i11
- 21 UP Squared 6000
- 40 UP Squared Pro
- 132 UP Xtreme
- 797 UP Squared
- 1.4K UP Board
- 86 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 41 UP AI Edge
- 213 Starter Kits & Peripheral