Score:0

Running scripts on startup

bv flag

I am trying to run a script as soon as my system starts. I am running ubuntu server version on an odroid M1. The script itself works when I use the command: ./StartJupyterNotebook.sh. However as soon as I try to call the script via crontab during a reboot nothing happens.

I modified the crontab with: crontab -e and to this I added the following code:

@reboot /home/odroid/Scripts/StartJupyterNotebook.sh.

Could someone please help me?

Thanks in advance

Gilles Quenot avatar
tn flag
Do you need network working in the script ? You should add debug stuff like `bash -x` and a log file
Artur Meinild avatar
vn flag
Does this answer your question? [How to run scripts on start up?](https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up)
Raffa avatar
jp flag
Depending on permissions required by your script you might need to add it to root’s crontab with `sudo crontab -e` … This might help: https://askubuntu.com/a/1415391
Score:0
tf flag

Try the following:

  1. Add your script to Cron list and schedule it to run in normal environment and not when the system reboots.

  2. There may be a permission issue. Add your script to Cron list with the root user so that it runs when the system reboots.

  3. Also, make sure the cron service is configured to automatically start at boot.

    sudo systemctl enable cron.service
    
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.