简体   繁体   中英

Run Jupyter notebook out of Jupyter environment

I have a Jupyter notebook containing python and R scripts as well as magic commands. What I need is to schedule a task using Windows Task scheduler that somehow triggers run of this notebook. My scripts run at night and I prefer Jupyter to be closed. So I wonder if there is a way to do this? Thank you in advance.

It is perfectly possible to do this

Create a bat file that you can reference in the windows task scheduler.

Code as follows:

cd C:\\path to your notebook jupyter nbconvert --to notebook --execute NOTEBOOKTOEXECUTE.ipynb

I needed to include the path, as the console would be run from the system path and thus unable to find the notebook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM