From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Using systemd timer units

Using systemd timer units - Linux Tutorial

From the course: Linux: Shells and Processes

Using systemd timer units

- Systemd allows you to define timer units. Systemd timers are a powerful alternative to cronjobs. There are two different types of timer units, real-time timers and monotonic timers. Real-time timers activate on calendar events, similar to cronjobs. They're started based on a date and time value. We could set a timer to run every year on December 31st at midnight that says Happy New Year. Or we can set a timer to run every Sunday that does a full backup of our system. Monotonic timers activate after a time span relative to a starting point. For instance if a timer is to be activated five minutes after the boot process or 30 seconds after we log in, we'd use a monotonic timer. The main benefits of using timers over cronjobs comes from each job having its own service file. Also jobs can be started independently of their timer making them easier to debug. Jobs can be configured to run in their own environment. Jobs can be…

Contents