Skip to main content

All Questions

Tagged with
0 votes
1 answer
69 views

cronjob: run script_A on boot/wake, then every 5 mins after that, run script_B on each of the 4 mins in between (so *not* just modulo-5 clock-minutes)

So I'd like to set up a cronjob in a very specific way: run script_A on boot/wake then every 5 minutes after, relative to that boot/wake (so not just modulo-5 clock-minutes) run script_B on each of ...
dwawlyn's user avatar
  • 23
0 votes
0 answers
265 views

Why is my systemd-timer not working? (Active = Until)

I created a systemd-timer which should restart a docker container daily but it never does. That uptime of the docker container is > 1 day, that shows me the container was not restarted /lib/systemd/...
3x3cut0r's user avatar
3 votes
0 answers
227 views

A monotonic systemd timer that is not distorted by suspension and downtime?

This is what I want: A timer that runs every X minutes by the wall clock. If the computer is asleep, then it should run as soon as it wakes up. And then again and again, every X minutes by the wall ...
Jortstek's user avatar
  • 243
0 votes
3 answers
150 views

What is the easiest way to run a program from time X to time Y?

There is a certain potentially failing process that I want to run until it succeeds, during the night time, say, from 23:00 to 7:00, but not later. A possible solution would be to: Add a cron job for ...
Vladimir Nikishkin's user avatar
0 votes
0 answers
87 views

What is the most efficient way to run a task every X hours of runtime, accumulated over all power-ons?

Let us assume that I have a machine which wakes up at 7:00, does some work, usually for 15 minutes, but sometimes for days (e.g., experiment supervision), and after the works is done, it powers ...
Vladimir Nikishkin's user avatar
1 vote
0 answers
440 views

how to take affect the seting on temporary files ( /tmp )

subject - new settings retarding temporary files ( redhat 7.2 ) we set new values on the following configuration files , in order to minimize /tmp capacity in file: /lib/systemd/system/systemd-...
yael's user avatar
  • 13.4k
2 votes
2 answers
8k views

How to make systemd timer run exactly every 10 minutes, with a task that lasts slightly longer than that?

I have a rather annoying issue with systemd timers and drifting start time. I had an old cron.d script (which executed faithfully once every 10 minutes) that I'm trying to modernize. The problem is ...
Teemu Karimerto's user avatar
2 votes
1 answer
3k views

How to see what command is being run by a systemd .timer file?

As an example, take the phpsessionclean schedule. The cron.d file for this looks like this: 09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; ...
Darren's user avatar
  • 449
6 votes
7 answers
6k views

Prevent systemd timer from running on startup

I've been migrating my crontabs to systemd's timer units. They all look similar to this: .timer file: [Unit] Description=timer that uses myjob.service [Timer] OnCalendar=*-*-* *:00:00 Unit=myjob....
bitofagoob's user avatar
  • 1,435
0 votes
1 answer
142 views

Command fails running in Systemd timer script

I have backup script for Mysql that previously ran using CRON without issue. I migrated to using systemd timer. The script starts out deleting the previous weeks files before the copy, using this ...
Sean W's user avatar
  • 1
145 votes
4 answers
76k views

Cron vs systemd timers

It was recently pointed out to me that an alternative to cron exists, namely systemd timers. However, I know nothing about systemd or systemd timers. I have only used cron. There is a little ...
Faheem Mitha's user avatar
  • 35.4k