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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Introduction to job scheduling2m
-
(Locked)
One time jobs using at and batch3m 55s
-
(Locked)
About cronjobs3m 5s
-
(Locked)
Recurring user jobs using cron2m 5s
-
(Locked)
Recurring system-wide jobs using cron2m 56s
-
(Locked)
Limit access to AT and cron2m 59s
-
(Locked)
Using systemd timer units3m 44s
-
(Locked)