Back to Practice
Lab

Scheduling Work with CronJobs

Schedule a recurring Job with a CronJob, then suspend it the way you'd pause a scheduled backup — without deleting it.

Your mission

A Job runs once; a CronJob runs a Job on a repeating schedule — the Kubernetes equivalent of a crontab entry. Nightly backups, hourly report generation, periodic cleanup: all natural CronJobs.

The schedule uses standard cron syntax (*/5 * * * * = every five minutes), and each firing creates a fresh Job, which creates a Pod. Two operational skills matter as much as creating one: reading the schedule, and suspending it — pausing the schedule without deleting the CronJob, so its history and definition survive and you can resume later. Deleting a CronJob to "stop it" throws away that history; suspending is the correct move.

In this lab you schedule a CronJob, then suspend it.

Useful aliases

In your terminal, k is aliased to kubectl and completion is configured. The jumpbox also has k9s, jq and yq installed.

Skills you'll put into practice

cronjobsbatchworkloads

Make it your own.

Use this topic as a starting point for a fresh custom scenario.

Create a variation