Questions tagged [systemd-timer]
The systemd-timer tag has no usage guidance.
159
questions
0
votes
1
answer
2k
views
Systemctl service not killed after timeout on RuntimeMaxSec
My script runs every minute (with systemctl timer) but it will occasionally hang for ever, meaning that unless I manually stop it, it won't run again. So I implemented a timeout with RuntimeMaxSec but ...
0
votes
1
answer
139
views
Changing Unit Configuration to restart httpd every 3s
I tried to add the following with systemctl edit httpd.service and this created /etc/systemd/system/httpd.service.d/override.confcontaining :
[Unit]
Restart=always
RestartSec=3
now after systemctl ...
0
votes
1
answer
1k
views
Is it possible to dynamically update systemd-timer's onCalendar?
sytemd-timer has a feature "onCalendar" using which we can execute a script on points of time (on calendar).
Is it possible to dynamically (programmatically) update or mutate that field?
For ...
3
votes
1
answer
1k
views
How to bind a user-level systemd service to network events?
I want to bind a user systemd timer (or service) to network events. For example consider this service:
[Unit]
Description=shows if connection changed
[Service]
Type=oneshot
Environment=DISPLAY=:0
...
9
votes
1
answer
3k
views
How to make a systemd-timer depend on internet connectivity?
I'm using systemd-timer to periodically run a script which consumes a webservice.
Problem is, upon system resume or wake-up, internet connectivity would not get started right away but the timer gets ...
1
vote
1
answer
391
views
systemd daily timer quits scheduling new events
I've been using a systemd timer reliably for months, but recently got alerted that the triggered service job hadn't run. When I used systemctl list-timers, indeed I saw that no more triggering events ...
3
votes
1
answer
392
views
Hourly systemd timer for work hours when end of day is after midnight?
I would like to run a systemd service hourly from 9am in the morning to 1am at night (one hour past midnight local time).
As a starting point I can use a time specification similar to the following to ...
0
votes
2
answers
1k
views
Have systemd timer to run immediately when started?
I have a timer that should run every 60 seconds like this:
[Unit]
Description=Trigger test timer
[Timer]
OnActiveSec=60
The timer triggers after waiting 60 seconds. But I want it to trigger ...
0
votes
1
answer
166
views
Directory mtime is not updated when creating a file in it only through a systemd timer, works fine when running the same command manually
I have the following service unit to back up my project database:
[Unit]
Description=%i mysql backup for `apples` database
After=mysqld.service
Requires=mysqld.service
[Service]
User=root
...
0
votes
1
answer
2k
views
Systemd Timer has no trigger
My systemd timer is configured the following way which should execute its service every 5 minutes.
[Unit]
Description=Sync mail
[Timer]
OnCalendar=*:0/5
Unit=mail.service
[Install]
WantedBy=multi-...
5
votes
2
answers
1k
views
How to reset left time of user systemd timer
How can I reset the left time of a user systemd timer?
I have a user systemd service:
[Unit]
Description=Remind to a take break
[Service]
ExecStart=/opt/scripts/break_reminder
Environment=PATH=/sbin:/...
0
votes
1
answer
1k
views
systemd-timer: undocumented "AccuracySec=0"
Can anyway tell me where is the document for "AccuracySec=0" of systemd-timer? The most closed document I found is "AccuracySec=1us". I know the meaning of AccuracySec but just ...
0
votes
1
answer
1k
views
Multiple Instances of Unit= in Path or Timer Unit?
Can multiple instances of Unit= exist in a systemd.path or systemd.timer unit? Or, must one instead specify multiple instances of the path or timer unit, each with a single instance of Unit=? I ...
0
votes
1
answer
785
views
Should i use default.target or timers.target value for WantedBy for a systemd user timer? [duplicate]
My .timer file located in ~/.config/systemd/user doesn't show in output of systemctl --user list-timers --all command unless i enable it. Is it normal for this command to not show disabled .timers ...
2
votes
1
answer
920
views
Install systemd timer + service silently with dh_installsystemd
I have a systemd service+timer that I'd like to install which does not match my packagename.
# debian/mypackage.myscript.timer
[Timer]
OnCalendar=weekly
Persistent=true
[Install]
WantedBy=timers....