如何定期自动运行Jupyter Notebook单元 [英] How to automate running of Jupyter Notebook cells periodically
本文介绍了如何定期自动运行Jupyter Notebook单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将jupyter笔记本与我的网站集成在一起,在这里我编写了代码以从 MySQL
服务器获取实时数据,并使用密谋
。但是每次我必须运行内核的所有单元时。我有办法自动执行定期说每天1小时的Jupyter笔记本单元的运行吗?
I want to integrate my jupyter notebook with my website, where I have written the code to fetch real-time data from MySQL
server and do real-time visualisation using plotly
. But every time I'm having to run all the cells of my Kernel. Is there a way I can automate the running of the Jupyter notebook cells periodically say everyday 1 hour?
推荐答案
我的建议是
- Setup a cron job with the periodicity you want.
- Use runipy to run all the cells in the notebook. It has a lot of functionality like saving the run as html report. This will particularly be useful in your case as you want to visualise plotly plots.
我可以在此处提供命令,但是它们非常简单,可以从链接中轻松地找到。
I can provide the commands here, but they are pretty straight forward and can easily be followed from the links.
这篇关于如何定期自动运行Jupyter Notebook单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文