Re: "semaphore" for .timer-triggered run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Aug 2, 2019, at 22:45, Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:
> 
> 02.08.2019 23:24, Johannes Ernst пишет:
>> I have a oneshot .service (certbot) that is run by its .timer with:
>> 
>> OnCalendar=daily
>> RandomizedDelaySec=1day
>> 
>> I also have a sometimes long-running script that may modify the same data. So the script and the oneshot service should never run at the same time.
>> 
> 
> If script itself runs as oneshot service, then putting After in your
> certbot.service should do it (it should wait for prerequisite service to
> complete).

No, the other script is a command-line tool invoked by the user.

> 
>> Is there a good systemd pattern for some kind of semaphore-like thing that will delay the execution of the oneshot service and try again when the script is done running?
>> 
>> I could skip execution, but then I miss an entire day until the service is run again -- I’d prefer it if it tried again a few minutes later. Or I could poll for some flag before running the main part of the service. Wondering whether there something more systemd-native.
>> 
>> Thanks,
>> 
>> 
>> 
>> Johannes.
>> 
>> _______________________________________________
>> systemd-devel mailing list
>> systemd-devel@xxxxxxxxxxxxxxxxxxxxx
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>> 
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux