[systemd-devel] Q: Start a unit n minutes after a successful boot
Tomasz Torcz
tomek at pipebreaker.pl
Tue Sep 8 07:58:33 UTC 2020
On Tue, Sep 08, 2020 at 09:21:02AM +0200, Ulrich Windl wrote:
> Hi!
>
> Configuring a new system with non-redundant system disk I'm wondering:
> How could I start an automatic backup job that is triggered n minutes
> after the system started successfully (to avoid backing up broken
> configurations)?
Timer with "OnBootSec=n minutes" is exactly what you want, right?
For judging if boot was successfull there are different approaches.
On my Fedora I see user unit with timer activating after 2 minutes.
If user session lasted for that long, then
ExecStart=/usr/sbin/grub2-set-bootflag boot_success
is invoked. There were some discussion on this mailinglist how to
improve detection and marking of good boot..
--
Tomasz Torcz Once you've read the dictionary,
tomek at pipebreaker.pl every other book is just a remix.
More information about the systemd-devel
mailing list