← All challenges
easylinux~15 min

Schedule a nightly backup with cron

The backup job is misconfigured and runs far too often. Fix the crontab so it runs once a day at 02:30, graded by actually testing when the schedule fires.

Scenario

A nightly backup is supposed to run once a day at 02:30. Someone wrote the crontab wrong and now it runs every minute of the 2 AM hour: sixty backups a night, hammering the disk. Fix it.

Cron field reminder

┌── minute (0-59)
│ ┌── hour (0-23)
│ │ ┌── day of month (1-31)
│ │ │ ┌── month (1-12)
│ │ │ │ ┌── day of week (0-6)
│ │ │ │ │
* * * * *  command

Your job

Edit crontab so the job:

  • fires at 02:30, every day,
  • does not fire at 02:31, 03:30, or midnight, and
  • runs /usr/local/bin/backup.sh.

How it's graded

We evaluate your schedule against several times and check it fires exactly when it should, not a string match.

Teaches: cron scheduling: reading and writing the five fields correctly.

What gets checked

Your solution is verified against each of these:

  • The crontab line parses
  • The job fires at 02:30
  • It does not fire at 02:31, 03:30, or midnight
  • It runs /usr/local/bin/backup.sh

Solve it in your browser

No setup, no install. Write your solution in the editor and hit Check. The in-house engine renders and grades it instantly, then issues your proof the moment every check passes.

Solve in browser →

Prefer your own lab?

  1. Build the fix locally. New to the tooling? See setting up your lab.
  2. Push your topology file, device configs, and any playbooks to a public repo (GitHub or GitLab).
  3. Submit the repo link. We review it by hand, confirm it works, and issue your proof page.
Submit your solution →