首页 > 解决方案 > jupyter nbconvert 执行到 html cron 作业不起作用

问题描述

我有这个 .sh 安排在 cron (ubuntu 18) 中:

#!/bin/sh
wget -O x/doc1.csv  https://www.x.com
wget -O x/doc2.csv  https://www.y.com
jupyter nbconvert --execute --to html x/notebook.ipynb

前两行运行完美,但 jupyter 行没有。如果我在终端中直接使用 ./ 执行 .sh ,它的性能会很好。任何想法?

标签: cronjupyterexecutenbconvert

解决方案


我只是将路径添加到命令并且它起作用了:

#!/bin/sh
wget -O x/doc1.csv  https://www.x.com
wget -O x/doc2.csv  https://www.y.com
/home/pakin/anaconda3/bin/jupyter nbconvert --execute --to html 
x/notebook.ipynb

推荐阅读