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
- 301 All Categories
- 104 Announcements & News
- 51 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 52 Unboxing & Project Sharing
- 24 Tech Updates
- 549 UP Products
- 1 UP Xtreme i12
- UP Squared Pro 7000
- 1 UP Element i12 Edge
- 11 UP Squared V2
- 25 UP 4000
- 24 UP Xtreme i11
- 34 UP Squared 6000
- 44 UP Squared Pro
- 140 UP Xtreme
- 819 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 221 UP Core
- 3 UP Xtreme Lite
- 43 UP AI Edge
- 215 Starter Kits & Peripheral