Systemd organizes services and other system resources as units, records system activity in a journal you can inspect with journalctl, and can schedule work with timer units. Timers cover many cron-like schedules, but they are not a guaranteed drop-in replacement for every cron feature. This guide explains how the pieces fit together and shows how to create a basic timer, inspect service logs, and check records from an earlier boot.
What is a systemd unit?
A unit is a named object systemd manages for boot-up and system maintenance. Services are one familiar type, but units can represent other resources or actions too. Most units are described by configuration files; some are generated from other configuration or runtime state, or created programmatically. The systemd project’s unit documentation describes the model.
As an Amazon Associate I earn from qualifying purchases.
Units can be active, inactive, activating or deactivating. What “active” means depends on the unit type: a running service and a mounted filesystem are different kinds of active objects.
Recommended Free Tools
Requirements and ordering are different
When connecting units, ask two separate questions: must another unit be included, and in what order should their jobs run?
#1 Best Overall
Requires=expresses a requirement relationship: a unit depends on another unit being pulled in.After=andBefore=express ordering. They specify which job should run first when both units are part of the transaction.
A requirement alone does not make the required unit start first. Without an ordering relationship, requested units can start in parallel. Use the appropriate dependency and ordering directives for the behavior you need.
How do I create a systemd timer?
A systemd timer is a .timer unit that activates a corresponding service unit. For a simple recurring job, create a service describing the work and a timer describing when to run it. The example below runs a script daily; replace the script path with a real executable available on your system.
-
Create
/etc/systemd/system/daily-report.service:[Unit] Description=Generate daily report [Service] Type=oneshot ExecStart=/usr/local/bin/daily-report -
Create
/etc/systemd/system/daily-report.timer:[Unit] Description=Run the daily report each day [Timer] OnCalendar=daily Persistent=true [Install] WantedBy=timers.target -
Tell systemd to reload unit files, then enable and start the timer:
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.sudo systemctl daemon-reload sudo systemctl enable --now daily-report.timer -
Check that the timer is loaded and see its next scheduled activation:
systemctl list-timers daily-report.timer
Systemd associates a timer with a service of the same base name by default, so daily-report.timer activates daily-report.service. The service should exit after completing the scheduled task; Type=oneshot is suitable for this kind of job. Check the timer and service manuals installed on your machine for supported syntax and details, since systemd versions can differ.
Calendar time or elapsed time?
Choose a calendar expression such as OnCalendar= when the job belongs at a wall-clock time or on a calendar cadence. Use a monotonic timer directive such as OnBootSec= or OnUnitActiveSec= when the event should occur after boot or after a unit activation, rather than at a particular time of day.
These are different scheduling models, not merely different spellings of a cron line. Calendar timers suit jobs tied to dates and clock times; monotonic timers suit intervals measured from an event or boot.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →What does Persistent=true do?
For calendar timers, Persistent=true records when the timer last triggered. If the machine was off when a scheduled event should have occurred, systemd may run the overdue event after the machine returns. This is a possible catch-up run, not a queue that replays every missed interval. Confirm that the directive and its behavior match the systemd version installed on the target machine.
How is a systemd timer different from cron?
Systemd timers handle many calendar-based recurring jobs and connect scheduling to systemd’s unit model. The systemd project’s historical release notes said calendar timer support brought timer events “considerably closer to cron’s capabilities.” That describes the feature’s direction; it does not establish complete equivalence or make timers a drop-in replacement for every cron use.
Rank #4
| Choice | Best fit | How it works |
|---|---|---|
| Calendar timer | A job tied to a calendar schedule | A .timer unit uses calendar-time triggers and activates a service unit. |
| Monotonic timer | A job timed from boot or another event | A .timer unit uses elapsed-time triggers, such as time since boot or a unit’s activation. |
| Cron entry | A job already managed with cron, or a need for cron-specific behavior | Cron schedules commands through its own configuration and service rather than through systemd timer units. |
The practical choice is based on the event you need: calendar timing, elapsed time from an event, or continued use of a cron-managed job. Avoid assuming that a schedule written for one system has identical behavior when moved to the other.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How do I view logs for a systemd service?
Use journalctl with the unit filter to inspect records for a service:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minutejournalctl -u name.service
For example, substitute the actual service unit name for name.service. To follow new records as they arrive, use:
Best Value
journalctl -f -u name.service
With no arguments, journalctl displays journal records the caller is permitted to read. Access to the system journal is permission-controlled; root and users in selected groups such as systemd-journal can read it, while other users may not. The official systemd 255 journalctl manual documents these filters and access behavior. Other systemd releases may have different manual details.
How do I see logs from the previous boot?
Use the boot selector with a negative index to view the previous boot’s records:
journalctl -b -1
To narrow that search to one service, combine the boot and unit filters:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
journalctl -b -1 -u name.service
These commands can only show records that exist and that your account can access. Whether earlier-boot records remain available depends on journal storage configuration.
Volatile or persistent journal storage
Journald can keep records in volatile storage or use persistent storage. The official systemd 252 journald.conf manual describes journald initially using volatile storage and flushing records to /var/log/journal/ when persistent storage is enabled. Do not assume a machine retains journal entries across a reboot: inspect its effective Storage= setting and account for distribution defaults.
System journals and user journals are distinct. The journalctl --user option addresses a user’s journal, whose persistence has its own conditions; a system-wide boot query and a user-journal query are not interchangeable.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




