make .screen folder.
mkdir ~/.screen && chmod 700 ~/.screen
Without this, you might meet an error Cannot make directory '/var/run/screen': Permission denied
add following command into .bash_profile
export SCREENDIR=$HOME/.screen
make a script file.
#!/bin/bash source .bash_profile screen -dmS jupyter bash -c "jupyter notebook"
Add cron command.
execute crontab -e
add the following code at the bottom of the file.
@reboot /home/username/scripts/jupyter_notebook.sh
Done!
コメント