Skip to main content

Manage your crontab from the Jupyter Notebook

Project description

nb_cron

Anaconda version Install with conda PyPI version Build Status Coverage Status

Provides crontab access from within Jupyter.

Cron tab in the Jupyter file browser

This extension adds a Cron tab to the Jupyter file browser and a Cron menu item in notebook view. Features include:

  • View the list of the cron job(s) that currently exist.
    • Edit existing cron job(s)
    • Delete existing cron job(s)
  • Add new cron job
  • Helper to build papermill command
    • Allows setting of notebook's environment, kernel and parameters
    • Able to inspect notebook (relative or full path) to extract environment, kernel and parameters to build papermill command and options
    • Able to set commands to run before and/or after papermill using jupyter_nbextensions_configurator

Installation

After installing the package using conda or pip, you can add nb_cron to jupyter as follows:

jupyter nbextension install nb_cron --py --sys-prefix --symlink
jupyter nbextension enable nb_cron --py --sys-prefix
jupyter serverextension enable nb_cron --py --sys-prefix

Cron tab in tree view

To create a new cron job:

  • Use the Create New Cron Job button at the top of the page, and fill in the bash command and cron schedule.
  • Use the Notebook Command Builder to build a bash command for running a notebook using papermill.

To edit an existing cron job:

  • Click the Edit button on the left of a cron job listing and fill in the bash command and cron schedule.

To delete an existing cron job:

  • Click the Trash button on the left of a cron job listing to delete the cron job.

Cron menu item in notebook view

To manage cron jobs

  • Click View cron jobs (refer to cron tab in tree view)

To schedule new cron job for current notebook

  • Click Schedule notebook job.
  • Opens up the Create new job and Notebook command builder dialog.
  • Auto inspect notebook and fill up the Notebook command builder dialog.

To edit existing cron job that uses current notebook

  • Click Edit notebook job.
  • Only available if there is an existing cron job contains the current notebook in the cron command.
  • Only able to edit the first job. Please use View cron jobs to edit if there are multiple jobs for the notebook.

To set parameters tag for papermill

  • Click notebook cell that you want to parameterize (cell that contains all the parameters for running papermill)
  • Click Cron > Set papermill parameters cell in menu bar.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nb_cron-0.4.4.tar.gz (52.5 kB view details)

Uploaded Source

Built Distribution

nb_cron-0.4.4-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file nb_cron-0.4.4.tar.gz.

File metadata

  • Download URL: nb_cron-0.4.4.tar.gz
  • Upload date:
  • Size: 52.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for nb_cron-0.4.4.tar.gz
Algorithm Hash digest
SHA256 92259a44d120ab33df0ebe58456af15e84b4ce3eaae3f1ac3262d679bc6b2d96
MD5 2be00a592617eceac4fb2a93e8d840ab
BLAKE2b-256 6896e8b46ccd877e8cc553499d8e08c1f186c9906c0c260a02d24fcd1520ba33

See more details on using hashes here.

File details

Details for the file nb_cron-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: nb_cron-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 44.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for nb_cron-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 26d938ddc7b84104fd58cb5bda768027c0a25e733842c18e6755049ca7b8a20f
MD5 a09a4f94c45ef61b4211293d8412052b
BLAKE2b-256 4fadf52bb8196d7c2c976295ee69967bcdc8a57d2590ff6dead4b2e239fef045

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page