[systemd-devel] delayed start 'on calendar' timers - is it possible?
Kamil Jońca
kjonca at o2.pl
Thu Dec 13 21:06:44 UTC 2018
Lennart Poettering <lennart at poettering.net> writes:
> On Do, 13.12.18 21:56, Kamil Jońca (kjonca at o2.pl) wrote:
>
>> Lennart Poettering <lennart at poettering.net> writes:
>>
>> [...]
>> >
>> > What do you mean by "run immediately"? Are you saying the service the
>> > timer is supposed to start is run immediately (which would be a bug),
>> Yes, service is started immediately.
>
> Please provide your precise .timer and .service unit file.
%cat /etc/systemd/system/kjonca-daily.timer
[Unit]
Description=kjonca daily
[Timer]
OnBootSec=0
#OnUnitInactiveSec=
OnCalendar=*-*-* 5:1
#OnUnitInactiveSec=30
Persistent=true
[Install]
WantedBy=default.target
%cat /etc/systemd/system/kjonca-daily.service
[Unit]
Description="kjonca daily"
[Service]
User=kjonca
Type=oneshot
ExecStart=/usr/local/bin/run-and-mail.sh kjonca "Daily run" zsh -c 'exec run-parts ~/etc/cron.daily'
KillMode=none
Dec 13 19:19:44 alfa sudo[25084]: kjonca : TTY=pts/9 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/systemctl start kjonca-daily.timer
Dec 13 19:19:44 alfa sudo[25084]: pam_unix(sudo:session): session opened for user root by kjonca(uid=0)
Dec 13 19:19:44 alfa systemd[1]: Started kjonca daily.
Dec 13 19:19:44 alfa sudo[25084]: pam_unix(sudo:session): session closed for user root
Dec 13 19:19:44 alfa systemd[1]: Starting "kjonca daily"...
[...]
Dec 13 19:21:10 alfa systemd[1]: Started "kjonca daily".
KJ
--
http://wolnelektury.pl/wesprzyj/teraz/
I don't know WHY I said that ... I think it came from the FILLINGS in
my rear molars ...
More information about the systemd-devel
mailing list