[systemd-devel] at replacement
Lennart Poettering
lennart at poettering.net
Fri Jul 13 08:11:21 UTC 2018
On Do, 12.07.18 13:07, Filipe Brandenburger (filbranden at google.com) wrote:
> Hi,
>
> On Thu, Jul 12, 2018 at 12:04 PM Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:
> > I know systemd can replace cron. Do folks use it to replace "at", too?
> >
> > I know it *can* - with two files per "at" entry and then enabling and starting the timer.
> >
> > Is there an easier with to replace "at" with systemd than creating two files and enabling and starting the timer?
>
> Take a look at systemd-run and, in particular, options such as
> --on-active=, --on-calendar= and --timer-property=, which allow you to
> set a .timer option on demand for a single one-off command.
>
> https://www.freedesktop.org/software/systemd/man/systemd-run.html#--on-active=
>
> I hope this helps!
One addition to the above: note that "at"'s queue is maintained
persistently, while timers created transiently with "systemd-run" are
lost on the next reboot.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list