Создал я для тестирования юнита скриптик:
#!/bin/bash
date | mail somemail@mail.ru
[Unit]
Description=testTimer
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStart=/usr/bin/tmail.sh
[Unit]
Description=HalfHourly Timer Target
StopWhenUnneeded=yes
[Unit]
Description=HalfHourly Timer
[Timer]
OnBootSec=1min
OnUnitActiveSec=1min
Unit=timer-halfhour.target
[Install]
WantedBy=basic.target
systemctl start testtimer.service на дает ничего. При этом:
someserver /usr/share # systemctl status testtimer.service testtimer.service - testTimer
Loaded: loaded (/etc/systemd/system/timer-halfhour.target.wants/testtimer.service)
Active: inactive (dead) since Пн 2013-10-14 21:48:11 MSK; 43s ago
Process: 14398 ExecStart=/usr/bin/tmail.sh (code=exited, status=0/SUCCESS)
Main PID: 14398 (code=exited, status=0/SUCCESS)
окт 14 21:48:11 someserver systemd[1]: Starting testTimer...
окт 14 21:48:11 someserver systemd[1]: Started testTimer.