Questions tagged [systemd-timers]

6 questions
4
votes
1 answer

Why does my systemd timer only trigger once when the unit is a target?

I have a couple of services (static site generators) that I want to trigger on a regular basis from the same systemd timer. I found this question/answer, which covers exactly what I want to do, and describes a setup whereby a .target file that…
Paul
  • 191
  • 7
2
votes
2 answers

Timer not started by userdata command after reboot

Issue description: On bootup we trigger the service initialization script that is shown below. The script is a part of Instance User Data. This script copies the necessary service/timer things to systemd folder and starts a timer. From time to time…
Cjoerg
  • 21
  • 4
1
vote
1 answer

Is it possible to use both `After=` and `Before=` options towards the same unit (service) together in systemd service?

The Type=oneshot unit A.service is started hourly by A.timer and it Wants=B.service, but runs Before=B.service. Unit B.service is also Type=oneshot. The requirement here is that their processes should never overlap at run time (oneshot ensures…
1
vote
2 answers

Adding a once off triggering of a systemd timer

I have a systemd timer which runs at 23:00 on Fridays in order to do some batch data processing once a week during low demand times. It is Tuesday, and I would like to test a change I have made, I would like it to start at 23:00 today, so that I can…
Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
0
votes
1 answer

How to troubleshoot Ubuntu Certbot cron/timer?

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal and have installed certbot via apt-get My issue is that it is the second time that certificates…
0
votes
0 answers

Run two scripts one after another with a systemd service

I have two scripts, what I would like to do is: at 1am, the first one runs once the first one stops, and this is a condition, the second one fires So, should i use: [Service] ExecStartPre = script.py ExecStart = secondscript.py or [Service] Type…
CrazyRabbit
  • 119
  • 1
  • 7