CertGrid CertGrid
Hands-on Lab·CompTIA Linux+

cron, timers, and one-off jobs

Domain 4 names scheduled tasks. This guide installs a cron job and waits for it, reads the environment cron actually gave it, writes the same job as a systemd timer with its service and timer units, asks systemd when a schedule will next fire, and runs a genuine one-off - then removes all of it.

Automation and Scripting Guide 19 of 28 Intermediate

One host. cron and systemd timers behave identically on the RPM family; only the crontab spool directory is named differently, and the page says where.
Server NameIP AddressOSRolesCPURAMHDD
LPLUS-A01192.168.0.73Ubuntu 26.04 LTSDebian-family host - apt, ufw, netplan, AppArmor2 Core4 GB50 GB

This guide includes

Use this for the scheduling marks. This matters because a scheduled job fails over the environment it was handed far more often than over its schedule - and that environment is measured here three ways.

Before you start

  1. A user crontab, and where it actually lives

  2. What cron actually gave the job

  3. The same job as a systemd timer

  4. Asking when a schedule fires

  5. A one-off job

  6. Putting the machine back

Official sources