Run Jupyter notebook out of Jupyter environment

只谈情不闲聊 提交于 2019-12-08 04:50:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/49296346/run-jupyter-notebook-out-of-jupyter-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!