I have a notebook that automatically queries a database, and then pushes the results to a google sheet every hour, but needs to be constantly running on a computer to work. How can I automatically run a Jupiter notebook when my computer starts up (I reboot a lot) Thanks!
I didn't actually tried with Anaconda but the solution should be comparable. The idea is to create vb
script and run it from the scheduled task.
Create jupyter-cron.vbs
Set run = WScript.CreateObject("WScript.Shell")
run.Run "jupyter-notebook.exe --no-browser --notebook-dir=C:\Notebooks", 0, True
Note: Use --no-browser option to prevent browser to start. The script will run with the hidden window. Do not forget to update path to the notebook directory.
Create jupyter-cron.bat
start /B "C:\Windows\SysWOW64\cscript.exe" "C:\Localdata\jupyter-cron.vbs"
Note: This location applies for 64-bit system, for the 32-bit system use C:\Windows\System32\cscript.exe. Do not forget to update path to vbs script.
Define scheduled task to run on system startup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With