Created
November 18, 2015 12:16
-
-
Save dmitryhd/4846fac52ceb8eadf686 to your computer and use it in GitHub Desktop.
Cron ipython runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # runs ipython notebook by cron | |
| # Add to cron | |
| # 42 14 * * * /home/user/cron_ipython_runner.sh | |
| source $HOME/.profile | |
| WORKDIR=/var/local/ | |
| RUNNERLOG=/tmp/recomm_runner.log | |
| NOTEBOOK=test_notebook.ipynb | |
| IPYTHONPATH=/usr/bin | |
| echo 'Start recom.' > $RUNNERLOG | |
| cd $WORKDIR | |
| echo 'cd' >> $RUNNERLOG | |
| $IPYTHONPATH/ipython nbconvert --to=html --ExecutePreprocessor.enabled=True $NOTEBOOK &> $RUNNERLOG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment