Page content and scripts provided by Philippe Ramage.
System V is gradually being phased out in favor of Systemd.
Crontab is replaced by a timer, which —unlike cron— does not send any mail.
The timer mechanism works by invoking a service defined in a yyy.service
file at the moment specified in an xxx.timer
file. The service file can run a command or call another file, which may be a binary executable or a script (shell, Python, Perl, etc.).
To receive the report by email, the trick is to have the service file execute a script that launches the indexing. A variable captures the messages emitted by the PHP indexing script. Once it finishes, the shell script (bash in our case) sends the email.
Download Aimy Sitemap CLI Systemd Scripts
Note:
Cron and systemd timers coexist without issue; they are independent and do not interact. You must choose one or the other, otherwise the job will run twice simultaneously, causing database deadlocks and resulting in truncated indexing.
Useful commands:
timer initialization: systemctl enable -now file_name.time
timer check by visualization of all tasks to be performed: systemctl list-timers -all
will give something like :
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sat 2025-10-11 04:51:06 UTC 5ms Sat 2025-10-11 04:51:06 UTC 9ms ago rmSocket.timer rmSocket.service
Sat 2025-10-11 04:52:00 UTC 53s Sat 2025-10-11 04:51:00 UTC 6s ago nxt_bscan.timer nxt_bscan.service
Sat 2025-10-11 04:55:35 UTC 4min 29s Sat 2025-10-11 04:50:35 UTC 30s ago nextcloudcron.timer nextcloudcron.service
Sat 2025-10-11 05:09:00 UTC 17min Sat 2025-10-11 04:39:00 UTC 12min ago phpsessionclean.timer phpsessionclean.service
Sat 2025-10-11 05:28:14 UTC 37min Sat 2025-10-11 04:31:50 UTC 19min ago apt-listbugs.timer apt-listbugs.service
Sat 2025-10-11 05:50:46 UTC 59min Fri 2025-10-10 08:57:25 UTC 19h ago apt-daily.timer apt-daily.service
Sat 2025-10-11 06:56:52 UTC 2h 5min Fri 2025-10-10 06:02:11 UTC 22h ago apt-daily-upgrade.timer apt-daily-upgrade.service
Sat 2025-10-11 07:16:30 UTC 2h 25min Fri 2025-10-10 06:01:28 UTC 22h ago man-db.timer man-db.service
Sat 2025-10-11 22:48:13 UTC 17h Fri 2025-10-10 22:48:13 UTC 6h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Sat 2025-10-11 23:55:00 UTC 19h Fri 2025-10-10 23:55:00 UTC 4h 56min ago aimySitemapCliCron.timer aimySitemapCliCron.service
Sun 2025-10-12 00:00:00 UTC 19h Sat 2025-10-11 00:00:00 UTC 4h 51min ago dpkg-db-backup.timer dpkg-db-backup.service
Sun 2025-10-12 00:39:27 UTC 19h Sat 2025-10-11 00:22:11 UTC 4h 28min ago logrotate.timer logrotate.service
Sun 2025-10-12 01:01:00 UTC 20h Sat 2025-10-11 01:01:00 UTC 3h 50min ago logwatch.timer logwatch.service
Sun 2025-10-12 03:10:17 UTC 22h Sun 2025-10-05 03:10:12 UTC 6 days ago e2scrub_all.timer e2scrub_all.service
Mon 2025-10-13 00:54:14 UTC 1 day 20h Mon 2025-10-06 01:08:02 UTC 5 days ago fstrim.timer fstrim.service
15 timers listed.
You can see the line for Aimy Sitemap Cli:
Sat 2025-10-11 23:55:00 UTC 19h Fri 2025-10-10 23:55:00 UTC 4h 56min ago aimySitemapCliCron.timer aimySitemapCliCron.service
Systemd Timer and Service Locations by Distribution Family
Location to put your 2 timers files:
Distribution / Family | Timer Type | .timer Location | .service Location | Description |
---|---|---|---|---|
Red Hat / Fedora / CentOS / Rocky / AlmaLinux | System | /etc/systemd/system/*.timer |
/etc/systemd/system/*.service |
Custom units created by the administrator |
Red Hat / Fedora / CentOS / Rocky / AlmaLinux | Package (RPM) | /usr/lib/systemd/system/*.timer |
/usr/lib/systemd/system/*.service |
Units provided by RPM-based packages |
Red Hat / Fedora / CentOS / Rocky / AlmaLinux | User | ~/.config/systemd/user/*.timer |
~/.config/systemd/user/*.service |
Units running in individual user sessions |
Debian / Ubuntu / Mint / Kali | System | /etc/systemd/system/*.timer |
/etc/systemd/system/*.service |
Persistent custom units |
Debian / Ubuntu / Mint / Kali | Package (DEB) | /lib/systemd/system/*.timer |
/lib/systemd/system/*.service |
Units provided by DEB-based packages |
Debian / Ubuntu / Mint / Kali | User | ~/.config/systemd/user/*.timer |
~/.config/systemd/user/*.service |
User-level timers and services |
Arch Linux / Manjaro / EndeavourOS | System | /etc/systemd/system/*.timer |
/etc/systemd/system/*.service |
Manually defined system-wide units |
Arch Linux / Manjaro / EndeavourOS | Package (Pacman) | /usr/lib/systemd/system/*.timer |
/usr/lib/systemd/system/*.service |
Units provided by Pacman-based packages |
Arch Linux / Manjaro / EndeavourOS | User | ~/.config/systemd/user/*.timer |
~/.config/systemd/user/*.service |
User timers commonly used instead of cron |
openSUSE / SUSE Linux Enterprise | System | /etc/systemd/system/*.timer |
/etc/systemd/system/*.service |
Custom units, often managed via YaST |
openSUSE / SUSE Linux Enterprise | Package (RPM) | /usr/lib/systemd/system/*.timer |
/usr/lib/systemd/system/*.service |
Units provided by zypper-based packages |
openSUSE / SUSE Linux Enterprise | User | ~/.config/systemd/user/*.timer |
~/.config/systemd/user/*.service |
User-level units compatible with YaST |
Gentoo | System | /etc/systemd/system/*.timer |
/etc/systemd/system/*.service |
Manually created, highly customizable units |
Gentoo | Package (Portage) | /usr/lib/systemd/system/*.timer |
/usr/lib/systemd/system/*.service |
Units provided by emerge (when systemd is enabled) |
Gentoo | User | ~/.config/systemd/user/*.timer |
~/.config/systemd/user/*.service |
User units often compiled with specific USE flags |