在Jupyter环境中运行Jupyter Notebook [英] Run Jupyter notebook out of Jupyter environment

查看:140
本文介绍了在Jupyter环境中运行Jupyter Notebook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Jupyter笔记本,其中包含python和R脚本以及魔术命令.我需要的是使用Windows Task Scheduler计划任务,该任务以某种方式触发了此笔记本的运行.我的脚本在晚上运行,所以我希望关闭Jupyter. 所以我想知道是否有办法做到这一点? 预先谢谢你.

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.

推荐答案

完全有可能做到这一点

创建一个可以在Windows任务计划程序中引用的bat文件.

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

代码如下:

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

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.

这篇关于在Jupyter环境中运行Jupyter Notebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆