DEV Community

Maksim Bober
Maksim Bober

Posted on

Add Cron to your Jupyter server

What is Cron? ⏰

The software utility cron is a time-based job scheduler in Unix-like computer operating systems. Users that set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like downloading files from the Internet and downloading email at regular intervals. - Wikipedia

Learn more 📚:

Some Cron jobs for Jupyter server

As an example, cron could run notebooks periodically and send diagnostics to slack channels or emails. It could run a backup script of data you are working with or schedule heavy computations at night so that the results are ready in the morning. You get the idea.

Example: Weather fetcher

This repo contains a setup showing how Cron and Jupyter server can be run together. weather_fetcher.ipynb is executed every 2 minutes. It fetches weather data from a static API provided by OpenWeather and sends the result in a text message using Twillio.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →