Apple Is Moving Away from AFP: How to Use a Linux SMB Server for Time Machine Backups

Apple’s Time Machine has been around for years, and many Mac users still associate network backups with Apple’s older AirPort Time Capsule, AirPort Extreme shared disks, or network storage devices that supported Apple Filing Protocol, commonly known as AFP. However, AFP is now part of Apple’s legacy networking past. For anyone running a home lab, Linux file server, or NAS-style backup target, the practical replacement is SMB.

This article explains what is happening with AFP, why Apple is moving away from it, and how to configure a Linux Mint 21.3 server as a Time Machine backup destination using Samba and SMB.

What Is AFP?

AFP stands for Apple Filing Protocol. It was Apple’s native file-sharing protocol for many years, especially during the classic Mac OS and early Mac OS X era. It was designed around Apple’s file system expectations and supported Mac-specific metadata, resource forks, and other behaviors that mattered more in earlier generations of the Mac ecosystem.

For a long time, AFP worked well in Apple-only environments. It was commonly used by older Mac file servers, AirPort Time Capsule devices, AirPort Extreme USB disk sharing, and some third-party NAS appliances. Because Time Machine was originally introduced in the Mac OS X era, many older Time Machine network backup targets were built around AFP.

The problem is that AFP is no longer Apple’s preferred direction. Apple now clearly recommends SMB when a choice exists between SMB and AFP for Time Machine backups (Apple, n.d.-a). Apple also states that Time Machine backup to NAS devices over AFP is not recommended and will not be supported in a future version of macOS (Apple, 2025a). In macOS Sequoia, Apple has also stated that the AFP client is deprecated and will be removed in a future version of macOS (Apple, n.d.-b).

AFP Is a Protocol, Not a Disk Format

One point that causes confusion is the phrase “AFP disk.” AFP is not a disk format like APFS, HFS+, ext4, XFS, or ZFS. AFP is a network file-sharing protocol. When someone says that macOS will not support “AFP disks,” what they usually mean is that macOS will stop supporting network shares accessed through AFP.

The actual disk behind the network share might be formatted as HFS+, APFS, ext4, XFS, ZFS, Btrfs, or something else. The client Mac normally does not directly see that underlying filesystem. It sees a network share presented through a protocol such as AFP or SMB.

This distinction matters because the solution is usually not to reformat the Linux server’s disk. The solution is to stop serving the backup location through AFP and serve it through SMB instead.

Why Apple Is Moving Away from AFP

Apple’s move away from AFP makes sense for several reasons.

First, AFP is old and Apple-specific. It is not a broad cross-platform standard in the same way SMB has become. SMB is widely used by macOS, Windows, Linux, enterprise NAS devices, and general file servers.

Second, Apple’s modern file-sharing direction has been moving toward SMB. Apple’s own Time Machine documentation says that if a choice is available between SMB and AFP, SMB should be used for backup (Apple, n.d.-a). Apple’s Time Machine support article also says third-party NAS devices should support Time Machine over SMB (Apple, 2025a).

Third, Apple’s modern file system, APFS, does not align with an AFP-centered future. Apple’s APFS documentation states that APFS volumes can be shared using SMB or NFS, but not AFP, and identifies AFP as deprecated (Apple, n.d.-c).

Finally, removing AFP reduces the number of legacy components Apple must maintain and secure. Every protocol included with macOS has to be tested, patched, and supported. As AFP usage declines, it makes sense for Apple to consolidate around SMB.

What This Means for Home Labs and Linux Servers

If you run a Linux server and want it to serve as a Time Machine destination, you should configure Samba for SMB-based Time Machine support. Samba is the standard SMB server implementation used on Linux and Unix-like systems.

For Mac compatibility, Samba provides a module called vfs_fruit. The Samba documentation describes vfs_fruit as providing enhanced compatibility with Apple SMB clients. It can also advertise a share as a Time Machine-capable destination by using the fruit:time machine = yes option (Samba Team, n.d.).

In practical terms, this means a Linux Mint 21.3 server can replace an AFP-based backup target as long as Samba is configured correctly.

Example Goal

In this example, the Linux Mint server will provide a Time Machine backup share with these assumptions:

Server hostname: server1
Backup directory: /data/timemachine
Linux backup user: tmbackup
Samba share name: TimeMachine
Maximum advertised Time Machine size: 1T

You can change those values to match your own environment.

Step 1: Install Samba and Avahi

On the Linux Mint server, install Samba and Avahi:

sudo apt update
sudo apt install samba avahi-daemon

Samba provides the SMB file-sharing service. Avahi provides local network service discovery using mDNS and DNS-SD, which is compatible with Apple Bonjour-style discovery (Avahi, n.d.). In many home networks, Avahi helps the Mac find the server automatically in Finder and Time Machine.

Enable and start the services:

sudo systemctl enable --now smbd
sudo systemctl enable --now avahi-daemon

Check that they are running:

systemctl status smbd --no-pager
systemctl status avahi-daemon --no-pager

Step 2: Create a Dedicated Time Machine User

Create a Linux user for Time Machine backups:

sudo adduser tmbackup

Then create a Samba password for that user:

sudo smbpasswd -a tmbackup
sudo smbpasswd -e tmbackup

This account will be used by the Mac when connecting to the Time Machine share.

For a home server, it is usually cleaner to create a dedicated backup account instead of using your normal Linux login account. This makes it easier to control permissions and isolate the backup location.

Step 3: Create the Backup Directory

Create the directory that will store the Time Machine sparsebundle backup files:

sudo mkdir -p /data/timemachine

Set ownership so the backup user can write to it:

sudo chown tmbackup:tmbackup /data/timemachine

Set restrictive permissions:

sudo chmod 700 /data/timemachine

This gives the tmbackup user access while preventing other local users from browsing the backup directory.

Step 4: Back Up the Samba Configuration

Before editing Samba, make a backup copy of the existing configuration:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak.$(date +%F)

Edit the Samba configuration using vi:

sudo vi /etc/samba/smb.conf

Add or adjust the following configuration.

[global]
   workgroup = WORKGROUP
   server role = standalone server
   security = user
   map to guest = Bad User
   min protocol = SMB2

   fruit:aapl = yes
   fruit:model = TimeCapsule

[TimeMachine]
   comment = Time Machine Backups
   path = /data/timemachine
   browseable = yes
   read only = no
   valid users = tmbackup

   vfs objects = catia fruit streams_xattr
   fruit:time machine = yes
   fruit:time machine max size = 1T

Save and exit vi.

A few settings are especially important:

min protocol = SMB2 prevents older SMB1 connections.

fruit:aapl = yes enables Apple SMB2+ extensions, which improve behavior and performance for Mac clients.

vfs objects = catia fruit streams_xattr enables the Samba modules commonly used for better macOS SMB compatibility.

fruit:time machine = yes advertises the share as Time Machine-capable.

fruit:time machine max size = 1T limits the size reported to Time Machine. This helps prevent Time Machine from assuming it can consume the entire underlying filesystem. Samba’s documentation warns that this value is an approximation based on Time Machine sparsebundle contents, so the share should be dedicated to Time Machine backups when using this option (Samba Team, n.d.).

Step 5: Test the Samba Configuration

Run:

testparm

If Samba reports no serious errors, restart Samba:

sudo systemctl restart smbd

Then confirm Samba is listening:

sudo systemctl status smbd --no-pager

Step 6: Allow Samba Through the Firewall

If UFW is enabled on the Linux Mint server, allow Samba:

sudo ufw allow Samba

Check firewall status:

sudo ufw status verbose

If the server and Mac are on the same trusted home network, this is usually sufficient. If the server is exposed to untrusted networks, do not open SMB broadly. SMB should normally be limited to a trusted LAN or VPN.

Step 7: Connect from macOS

On the Mac, open Finder and choose:

Go > Connect to Server

Enter:

smb://server1.local/TimeMachine

If .local name resolution does not work, use the server’s IP address instead:

smb://192.168.1.50/TimeMachine

Log in with:

Username: tmbackup
Password: the Samba password you set with smbpasswd

Once the share mounts successfully, open Time Machine settings on the Mac and select the network share as the backup disk.

On recent macOS versions, go to:

System Settings > General > Time Machine

Then add or select the SMB share as the backup destination.

Step 8: Encrypt the Backup from the Mac

When setting up the Time Machine destination, enable backup encryption from the Mac if available. This protects the backup contents if someone gains access to the server’s disk or copies the Time Machine sparsebundle.

Encryption is especially important for laptops because Time Machine backups may contain browser data, documents, email data, SSH keys, application data, and other sensitive information.

Store the encryption password safely. If you lose the Time Machine encryption password, you may not be able to restore from that backup.

Step 9: Verify That Backups Are Running

After configuration, start a backup from the Mac. On the Linux server, you can watch the backup directory:

sudo ls -lh /data/timemachine

You should eventually see a Time Machine sparsebundle created for the Mac.

You can also check Samba logs if something fails:

sudo journalctl -u smbd --no-pager

Or review Samba log files:

ls -lh /var/log/samba/

Troubleshooting Tips

If the Mac cannot see the server automatically, connect manually using Finder with the smb:// path.

If the Mac can connect but Time Machine does not list the share, recheck that the share includes:

fruit:time machine = yes

If the share appears but backups fail, check permissions on the backup directory:

ls -ld /data/timemachine

The directory should be writable by the Samba user.

If name resolution fails, try the server’s IP address instead of the .local hostname.

If the backup grows too large, reduce the value of:

fruit:time machine max size = 1T

Then restart Samba:

sudo systemctl restart smbd

Recommended Practices

Use a dedicated share for Time Machine. Do not mix normal file storage and Time Machine backups in the same directory.

Use a dedicated Samba user for backups.

Use a wired connection for the first backup if possible. The first Time Machine backup can be large.

Use redundant storage if the backup matters. A Time Machine backup stored on a single failing disk is still a single point of failure.

Do not expose SMB directly to the internet.

Periodically test restores. A backup is only useful if it can be restored.

Conclusion

AFP served Mac users well for many years, but it is now a legacy protocol. Apple is clearly moving Time Machine network backups toward SMB, and future macOS versions will remove AFP support. For Linux server users, the practical answer is to configure Samba with Apple-compatible settings and enable Time Machine support through vfs_fruit.

A Linux Mint 21.3 system can work well as a Time Machine backup target when Samba is configured properly. By using SMB, a dedicated backup user, proper permissions, and the fruit:time machine = yes setting, you can replace an older AFP-based backup workflow with a more modern and future-ready configuration.

References

Apple. (2025a, December 5). Backup disks you can use with Time Machine. Apple Support. https://support.apple.com/en-us/102423

Apple. (n.d.-a). Types of disks you can use with Time Machine on Mac. Apple Support. Retrieved June 3, 2026, from https://support.apple.com/guide/mac-help/types-of-disks-you-can-use-with-time-machine-mh15139/mac

Apple. (n.d.-b). What’s new for enterprise in macOS Sequoia. Apple Support. Retrieved June 3, 2026, from https://support.apple.com/en-us/121011

Apple. (n.d.-c). Apple File System Guide: Frequently Asked Questions. Apple Developer Documentation Archive. Retrieved June 3, 2026, from https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

Avahi. (n.d.). mDNS/DNS-SD. Retrieved June 3, 2026, from https://avahi.org/

Samba Team. (n.d.). vfs_fruit. Samba Documentation. Retrieved June 3, 2026, from https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html

Installing the Latest Minecraft Java Server on Linux Mint and Connecting from Windows 11

Running a private Minecraft server is a useful home-lab project because it combines Linux administration, Java runtime management, firewall configuration, systemd service management, and basic client/server troubleshooting. This guide explains how to install the latest Java-based Minecraft server on the latest Linux Mint release, then connect to it from a Windows 11 Minecraft client.

As of May 23, 2026, the latest Linux Mint release listed by the project is Linux Mint 22.3 'Zena,' and the latest Minecraft Java release identified on Minecraft.net is Minecraft Java Edition 26.1.2, published April 9, 2026. Future readers should always confirm the current version on the official Linux Mint and Minecraft download pages before installing.

Java Edition versus Bedrock Edition

This article is about the Minecraft: Java Edition server, distributed as a .jar file. Mojang's server download page states that the Java Edition server setup is compatible with Minecraft: Java Edition, not Bedrock Edition. That distinction matters because a normal Windows Bedrock client will not connect directly to a vanilla Java Edition server.

For this setup, the Windows 11 client must run:

Minecraft: Java Edition

not:

Minecraft for Windows

The Minecraft Launcher can provide access to both editions, but the edition selected in the launcher must match the server type. The Microsoft Store listing for the launcher identifies it as available for Windows 10 and Windows 11 and notes that it provides access to Minecraft: Java Edition and Minecraft for Windows.

Install Java 25 on Linux Mint

Recent Minecraft Java versions require a newer Java runtime. The Minecraft Java Edition 26.1 release notes state that the game now requires Java 25 and that the included Java distribution is the Microsoft build of OpenJDK 25.

Linux Mint may not include Java 25 in its default repositories, so a practical approach is to install Eclipse Temurin from Adoptium. Adoptium provides DEB packages for Debian and Ubuntu-style systems, and its documentation specifically notes that Linux Mint users should use UBUNTU_CODENAME instead of VERSION_CODENAME when configuring the repository.

Install Java 25:

sudo apt update
sudo apt install -y wget apt-transport-https gpg

wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public \
| gpg --dearmor \
| sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null

echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^UBUNTU_CODENAME/{print$2}' /etc/os-release) main" \
| sudo tee /etc/apt/sources.list.d/adoptium.list

sudo apt update
sudo apt install -y temurin-25-jdk

 Verify the Java version:

java -version

 You should see output showing Java 25. If multiple Java versions are installed, you can use the full Java path later in the systemd service to avoid accidentally launching Minecraft with the wrong runtime.

Create a Minecraft server user and directory

Do not run the Minecraft server as root. Create a dedicated service account and server directory:

sudo useradd --system --home-dir /opt/minecraft --shell /usr/sbin/nologin minecraft
sudo mkdir -p /opt/minecraft
sudo chown -R minecraft:minecraft /opt/minecraft

Switch into the server directory:

cd /opt/minecraft

 Download the Minecraft server .jar

Download the official Java Edition server .jar from Mojang's Minecraft server download page or from the latest release article. Mojang's server download page states that downloading the software means agreeing to the Minecraft End User License Agreement and Privacy Policy, so this step should be done from the official Minecraft source.

Use a browser to open the official Minecraft server download page, right-click the server .jar link, and copy the link address. Then download it on the Linux Mint server:

sudo -u minecraft wget -O /opt/minecraft/server.jar '<paste official Minecraft server.jar URL here>'

For future-proof documentation, I recommend naming the downloaded file server.jar and documenting the actual Minecraft version separately in a text file:

echo "Minecraft Java Server installed from official Mojang server.jar link" | sudo tee /opt/minecraft/README.txt
sudo chown minecraft:minecraft /opt/minecraft/README.txt

 First start and EULA acceptance

Start the server once to generate the initial configuration files:

sudo -u minecraft /usr/lib/jvm/temurin-25-jdk-amd64/bin/java -Xms2G -Xmx4G -jar /opt/minecraft/server.jar nogui

 The server will stop and create an eula.txt file. Edit it:

sudo vi /opt/minecraft/eula.txt

 Change:

eula=false

 to:

eula=true

 Save the file. Mojang's server download page explains that the server is run from the command line with Java and that the nogui option can be omitted only if the graphical interface is desired. On a Linux server, nogui is normally the right choice.

Start the server again:

sudo -u minecraft /usr/lib/jvm/temurin-25-jdk-amd64/bin/java -Xms2G -Xmx4G -jar /opt/minecraft/server.jar nogui

 When the server finishes loading, you should see a message indicating that it is ready. Stop it with:

Ctrl + C

Configure basic server settings

The main configuration file is:

/opt/minecraft/server.properties

 Edit it:

sudo vi /opt/minecraft/server.properties

 For a simple home server, these are the most important settings to review:

server-port=25565
server-ip=
motd=A Linux Mint Minecraft Server
enable-command-block=false
white-list=false
online-mode=true
difficulty=easy
gamemode=survival

 Leave server-ip= blank unless you have a specific reason to bind the server to only one address. For most home and lab servers, leaving it blank allows Minecraft to listen normally on the system's available interfaces.

Open the firewall

Minecraft Java Edition normally listens on TCP port 25565. If UFW is enabled on Linux Mint, allow that port:

sudo ufw allow 25565/tcp
sudo ufw status verbose

 Find the Linux server's IP address:

ip -o -4 addr show up scope global

 You should see an address such as:

192.168.1.50/24

 The Windows client will use that IP address to connect.

Manage the server with systemd

A manual command is useful for testing, but a real server should be managed by systemd. Create a service file:

sudo vi /etc/systemd/system/minecraft.service

 Add:

[Unit]
Description=Minecraft Java Server
After=network.target

[Service]
Type=simple
User=minecraft
Group=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/lib/jvm/temurin-25-jdk-amd64/bin/java -Xms2G -Xmx4G -jar /opt/minecraft/server.jar nogui
Restart=on-failure
RestartSec=10
SuccessExitStatus=0 143

[Install]
WantedBy=multi-user.target

 Reload systemd and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft

 Check status:

systemctl status minecraft

 Watch the live logs:

journalctl -u minecraft -f

 Useful management commands:

sudo systemctl start minecraft
sudo systemctl stop minecraft
sudo systemctl restart minecraft
systemctl status minecraft
journalctl -u minecraft -n 100

Troubleshooting Java version errors

If the server fails with an error such as:

UnsupportedClassVersionError

the Minecraft server .jar was compiled for a newer Java runtime than the one used to start it. Since Minecraft 26.1 requires Java 25, the fix is to make sure the systemd service uses Java 25 directly:

/usr/lib/jvm/temurin-25-jdk-amd64/bin/java -version

If that shows Java 25, use that exact path in the ExecStart= line of the systemd service.

Install the Minecraft client on Windows 11

On the Windows 11 PC, install the Minecraft Launcher from the Microsoft Store or from the official Minecraft download page. Minecraft's download page says the launcher can be installed through the Microsoft Store or from Minecraft.net, and the official Help Center provides instructions for downloading and installing the launcher.

On Windows 11:

1.       Open Microsoft Store.

2.       Search for Minecraft Launcher.

3.       Install Minecraft Launcher.

4.       Open the launcher.

5.       Sign in with the Microsoft account that owns Minecraft.

6.       Select Minecraft: Java Edition.

7.       Use Latest Release, or choose the exact version that matches the server.

8.       Click Play.

The client and server should run the same Minecraft Java version. Mojang's 26.1.2 release notes instruct players to use the Minecraft Launcher and set it to 'Latest Release' to install the release.

If you need to select a specific version:

Minecraft Launcher → Minecraft: Java Edition → Installations → New Installation

Then choose the version that matches the server.

Connect from Windows 11 to the Linux Mint server

Once Minecraft Java Edition is running on Windows 11:

9.       Click Multiplayer.

10.   Click Add Server or Direct Connection.

11.   Enter the Linux Mint server IP address.

12.   Click Join Server.

If the server IP is:

192.168.1.50

and the server is using the default port, enter:

192.168.1.50

If you changed the port, enter it like this:

192.168.1.50:25565

If the client cannot connect, test from Windows PowerShell:

Test-NetConnection 192.168.1.50 -Port 25565

A successful result should show:

TcpTestSucceeded : True

If that test fails, check these items:

·         The Minecraft service is running on Linux.

·         The Linux firewall allows TCP 25565.

·         The Windows client is on the same network or has a route to the server.

·         The client is running Minecraft: Java Edition, not Bedrock Edition.

·         The client version matches the server version.

·         The server.properties file uses the correct port.

Optional: allow only known players

For a private server, consider enabling the whitelist:

sudo vi /opt/minecraft/server.properties

Set:

white-list=true

Restart the server:

sudo systemctl restart minecraft

Add a player from the Minecraft server console or by using the server command interface:

whitelist add PlayerName

You can send commands to the running server through the service logs only if you have set up a console method such as screen, tmux, or a management wrapper. For a basic setup, stopping the service and running the server manually for administration is sometimes simpler.

Final checklist

A working Linux Mint Minecraft Java server should have:

·         Linux Mint installed and updated.

·         Java 25 installed.

·         Official Minecraft Java server.jar downloaded from Mojang.

·         Dedicated minecraft service account.

·         EULA accepted.

·         server.properties reviewed.

·         TCP port 25565 allowed through the firewall.

·         minecraft.service enabled and running.

·         Windows 11 client running Minecraft: Java Edition.

·         Client version matching the server version.

This setup gives you a stable vanilla Minecraft Java server that starts automatically, runs as a non-root user, logs through systemd, and is accessible from Windows 11 clients on the network.

References

Adoptium. (n.d.). Linux (RPM/DEB/APK) installer packages. Eclipse Foundation. https://adoptium.net/installation/linux

Linux Mint. (n.d.). Download Linux Mint 22.3. https://linuxmint.com/download.php

Microsoft. (n.d.). Minecraft Launcher. Xbox. https://www.xbox.com/en-US/games/store/minecraft-launcher/9pgw18npbzv5

Mojang. (2026, March 24). Minecraft Java Edition 26.1. Minecraft. https://www.minecraft.net/en-us/article/minecraft-java-edition-26-1

Mojang. (2026, April 9). Minecraft Java Edition 26.1.2. Minecraft. https://www.minecraft.net/en-us/article/minecraft-java-edition-26-1-2

Mojang. (n.d.-a). Download Minecraft & server software. Minecraft. https://www.minecraft.net/en-us/download

Mojang. (n.d.-b). Download the Minecraft: Java Edition server. Minecraft. https://www.minecraft.net/en-us/download/server

Mojang. (n.d.-c). How to download and install the Minecraft Launcher. Minecraft Help Center. https://help.minecraft.net/hc/en-us/articles/23907917790093-How-to-Download-and-Install-the-

How to Run a Script on a Schedule with systemd Timers

Most Linux administrators know about cron, but modern Linux systems also include another powerful scheduling option: systemd timers. A systemd timer lets you run a script on a schedule using the same management framework you already use for services. That means you can start, stop, enable, disable, inspect, log, and troubleshoot scheduled jobs with familiar systemctl and journalctl commands.

The Basic Pattern

A scheduled systemd job normally has three parts: a script that does the work, a .service unit that runs the script, and a .timer unit that schedules the service.

1. A script that does the work.
2. A .service unit that runs the script.
3. A .timer unit that schedules the service.

Step 1: Create a Script

sudo vi /usr/local/sbin/example-job.sh

Add the following script:

#!/bin/bash

LOGFILE="/var/log/example-job.log"

{
    echo "============================================================"
    echo "Example job started: $(date)"
    echo "Hostname: $(hostname)"
    echo "This is where the scheduled work would happen."
    echo "Example job finished: $(date)"
    echo "============================================================"
    echo
} >> "$LOGFILE"

exit 0

Make the script executable:

sudo chmod 750 /usr/local/sbin/example-job.sh
sudo chown root:root /usr/local/sbin/example-job.sh

Test the script manually before involving systemd:

sudo /usr/local/sbin/example-job.sh
sudo tail -n 20 /var/log/example-job.log

Step 2: Create the systemd Service

sudo vi /etc/systemd/system/example-job.service

Create the following service unit:

[Unit]
Description=Run the example scheduled job

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/example-job.sh

Reload systemd and test the service:

sudo systemctl daemon-reload
sudo systemctl start example-job.service
systemctl status example-job.service
journalctl -u example-job.service -n 50

Step 3: Create the systemd Timer

sudo vi /etc/systemd/system/example-job.timer

Create the timer unit:

[Unit]
Description=Run the example scheduled job once per day

[Timer]
OnCalendar=*-*-* 07:00:00
Persistent=true
Unit=example-job.service

[Install]
WantedBy=timers.target

This timer runs the script once per day at 7:00 AM local server time. Persistent=true means the job will run later if the system was powered off during the scheduled time.

Step 4: Enable and Start the Timer

sudo systemctl daemon-reload
sudo systemctl enable --now example-job.timer

Check the timer and view the next scheduled run:

systemctl status example-job.timer
systemctl list-timers --all | grep example-job

Step 5: Test and Troubleshoot

To manually run the scheduled job immediately:

sudo systemctl start example-job.service

To view logs from the service:

journalctl -u example-job.service -n 100
journalctl -u example-job.service -f

To stop the timer temporarily:

sudo systemctl stop example-job.timer

To disable the timer permanently:

sudo systemctl disable --now example-job.timer

Common OnCalendar Examples

Schedule

OnCalendar Value

Every day at 7:00 AM

*-*-* 07:00:00

Every hour

hourly

Every Monday at 1:00 AM

Mon *-*-* 01:00:00

Every day at midnight

daily

Every 15 minutes

*:0/15

Final Thoughts

systemd timers provide a clean and modern way to schedule recurring jobs on Linux. Unlike cron, timers integrate directly with systemctl and journalctl, making them easier to manage, troubleshoot, and monitor. Once you understand the pattern of script, service, and timer, you can apply it to backups, antivirus scans, maintenance tasks, monitoring scripts, and many other server administration jobs.

References

freedesktop.org. systemd.timer: Timer unit configuration. https://www.freedesktop.org/software/systemd/man/systemd.timer.html 

freedesktop.org. systemd.service: Service unit configuration. https://www.freedesktop.org/software/systemd/man/systemd.service.html

freedesktop.org. systemctl: Control the systemd system and service manager. https://www.freedesktop.org/software/systemd/man/systemctl.html