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
- All Categories
- 63 Announcements & News
- 139 Product News - New Product/Product Change Notice/ End-of-life
- 112 Welcome Developers!
- 60 Unboxing & Project Sharing
- 114 Tech Updates
- 3.6K UP Products
- 119 UP 7000
- 25 UP Squared i12
- 24 UP Xtreme i12
- 14 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 24 UP Squared V2
- 65 UP 4000
- 23 UP Xtreme i11
- 34 UP Squared 6000
- 59 UP Squared Pro
- 135 UP Xtreme
- 820 UP Squared
- 1.4K UP Board
- 74 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 40 UP AI Edge
- 265 Starter Kits & Peripheral