Skip to main content

All Questions

Tagged with
0 votes
1 answer
31 views

Systemd timer only starts when service is stopped

I have a service that runs a python script: [Unit] Description="Daily python service" [Service] WorkingDirectory=/home/ubuntu/python_project/ ExecStartPre=/bin/bash -c 'truncate -s 0 /var/...
RudyGoburt's user avatar
0 votes
1 answer
64 views

Is there a way to schedule a lazy timer relative to another timer?

(x-mas.service) [Unit] Description=Celebrate X-Mas [Service] Type=simple ExecStart=/usr/sbin/x-mas-day [Install] WantedBy=multi-user.target (x-mas.timer) [Unit] Description=Add "X-Mas" to ...
Noob Saibot's user avatar
3 votes
1 answer
111 views

Managing ordering dependencies between systemd template instances

Abstracted example: I have two recurring tasks A and B that I want to setup as systemd services. As the tasks are quite similar to each other, I am using a template [email protected]; A and B will be ...
bluesheep's user avatar
2 votes
0 answers
59 views

Systemd - run bash script after user login on specific days

I use the i3 window manager and every day of remote work I would like to run a script that is responsible for setting up my monitors. On Tuesdays, I work onsite, then I'll want to run another script. ...
A.J.'s user avatar
  • 21
1 vote
1 answer
74 views

Ubuntu systemd service with timer is slow

I've set up a systemd timer to trigger a service every minute on Ubuntu 22.04, but I'm encountering an issue where the execution time of the service significantly increases after the first run. The ...
Tihomir Dimov's user avatar
0 votes
1 answer
65 views

Systemd executable failed to read file from CacheDirectory with Permission Denied

I have a Golang binary that runs every 5 mins. It is supposed to create & update a text file which needs to be write restricted. To run this binary I created a systemd service and a systemd timer ...
Korba's user avatar
  • 103
0 votes
0 answers
47 views

systemd timers with long lived processes, avoiding overlaps

I have script that will scan for tasks, and work on one at a time to completion and then exit. Execution can last 1s (no tasks) to 2hours (heavy task). And subsequent runs should start as soon as ...
gcb's user avatar
  • 428
0 votes
1 answer
66 views

How to indicate hour range in Timer using OnCalendar?

systemd 219 version Ubuntu 22.04.2 LTS [Unit] Description=Run myscript.service every 5 minutes [Timer] OnCalendar= *-*-* 10-23:10/5:00 Persistent=true [Install] WantedBy=timers.target I need to run ...
Aigerim's user avatar
3 votes
1 answer
282 views

Why systemctl status shows a time in the future and the amount of time left?

When we issue "systemctl status", we usually get in the output, a line showing the status and for how long it has been in that status. Like: (I issued that few minutes ago) Active: active (...
Travelling_Bird's user avatar
0 votes
0 answers
331 views

How do I correctly set up systemd-time-wait-sync.service

I have to set up a a timer with onCalendar=*:30 on a Raspberry Pi with no internet connection but using instead a battery powered RTC. To sync my RTC I followed this post. On the manual page of ...
Pa Dalton's user avatar
1 vote
2 answers
234 views

How to avoid systemd periodic realtime timer running at boot

I have a realtime timer with Persistent=false running immediately after boot although my objective is to run it periodically! I saw it is a rather common question but none of the answers I found in ...
Pa Dalton's user avatar
0 votes
2 answers
2k views

Unit templates and non-template destination units

I like to keep my custom unit files in their own directory away from /etc. In 247 this worked well, using something like the following: systemctl enable /path/to/unit.service This also worked with ...
Spammy's user avatar
  • 31
0 votes
2 answers
1k views

How can I specify a maximum service duration in systemd service?

I have a problem where on rare occasions my Type=simple systemd service hangs or gets caught in a loop. This causes its timer to stop scheduling the service because, as confirmed with sudo systemctl ...
user avatar
0 votes
1 answer
390 views

Run systemd timer even if process is still running

It has been confirmed that systemd timers won't start the .service if previous run hasn't finished. However, for unknown reason this blocks some Type=oneshot backup processes on my machine (they seem ...
Daniel Krajnik's user avatar
2 votes
1 answer
147 views

Ensure that systemd timer instances of same template are not running in parallel

I have a systemd timer template [email protected] and a corresponding service [email protected]. The job runs daily and has a generous RandomizedDelaySec of 2 hours. The job has many instances. Can I tell systemd ...
sedrubal's user avatar
  • 316

15 30 50 per page
1
2 3 4 5
9