I am trying to make a cronjob that executes on reboot of my machine.
The job is a .sh script that is located in the custom dir start. path from home is: Home/start/start.sh
The script needs sudo permissions to run so i edited the cron tab like so: sudo crontab -eu root
In this file i added the following line of code: @reboot /home/username/start/start.sh
This line is located at the very bottom of the crontab file.
I have never done this before so i have no idea what i am missing or doing wrong :( all suggestions are welcome. If something is unclear let me know so i can clarify.
Thanks
/home/start/
or is it/home/username/start
? – steeldriver May 31 '18 at 11:59cron
is not the right tool for opening a GUI program - a whole lot of other stuff needs to be running before that happens. See for example How do I start applications automatically on login? or (if you are looking for a kiosk type setup) Customize Ubuntu for a library Internet kiosk – steeldriver May 31 '18 at 12:14