diff --git a/modules/qualifying/learning_systemd.md b/modules/qualifying/learning_systemd.md index 6716f91..37071c5 100644 --- a/modules/qualifying/learning_systemd.md +++ b/modules/qualifying/learning_systemd.md @@ -543,21 +543,25 @@ If you now watch your log in real time with `journalctl -f --user-unit monitor.s The following advice was taken from the arch [wiki](https://wiki.archlinux.org/title/Systemd/Timers). ->As a cron replacement +#### As a cron replacement + Although cron is arguably the most well-known job scheduler, systemd timers can be an alternative. ->Benefits +##### Benefits + The main benefits of using timers come from each job having its own systemd service. Some of these benefits are: ->Jobs can be easily started independently of their timers. This simplifies debugging. -Each job can be configured to run in a specific environment (see systemd.exec(5)). -Jobs can be attached to cgroups. -Jobs can be set up to depend on other systemd units. -Jobs are logged in the systemd journal for easy debugging. -Caveats +* Jobs can be easily started independently of their timers. This simplifies debugging. +* Each job can be configured to run in a specific environment (see systemd.exec(5)). +* Jobs can be attached to cgroups. +* Jobs can be set up to depend on other systemd units. +* Jobs are logged in the systemd journal for easy debugging. + +##### Caveats + Some things that are easy to do with cron are difficult to do with timer units alone: ->Creation: to set up a timed job with systemd you need to create two files and run systemctl commands, compared to adding a single line to a crontab. -Emails: there is no built-in equivalent to cron's MAILTO for sending emails on job failure. See the next section for an example of setting up a similar functionality using OnFailure=. -Also note that user timer units will only run during an active user login session by default. However, lingering can enable services to run at boot even when the user has no active login session. +* Creation: to set up a timed job with systemd you need to create two files and run systemctl commands, compared to adding a single line to a crontab. +* Emails: there is no built-in equivalent to cron's MAILTO for sending emails on job failure. See the next section for an example of setting up a similar functionality using OnFailure=. +Also note that user timer units will only run during an active user login session by default. However, lingering can enable services to run at boot even when the user has no active login session.