🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Linux Intermediate

What is Systemd Timer?

A systemd unit that triggers services on a schedule or at specific events, serving as a modern alternative to cron jobs.

Systemd timers consist of two files: a .timer unit defining the schedule and a .service unit defining the task. They offer advantages over cron including logging integration (via journalctl), dependency management, resource control (cgroups), randomized delays to prevent thundering herds, persistent timers that catch up on missed runs, and calendar event expressions. OnCalendar= specifies time-based schedules (e.g., daily, weekly) while OnBootSec= and OnUnitActiveSec= define relative timers. List active timers with systemctl list-timers.