>
> - en vez de un guión, crea un servicio q arrancas y paras desde cron
> - crear un servicio de systemd de tipo `oneshot`, y usar la opción
> `RuntimeMaxSec` y el servició será parado automáticamente, si no
> termina antes, puedes además crear un temporizador de systemd para
> arrancar este servicio.
>
> Servilio
Realmente hay que actualizarse un poco a Systemd "like" pues a veces
nos hace las cosas mas faciles...
Mira tienes que probar para ver si realmente lo de Servilio funciona,
parece ser la mejor altermativa aunque, acabo de ver la documentacion de
systemd y dice esto
--
RuntimeMaxSec=
Configures a maximum time for the service to run. If this is used
and the service has been active for longer than the specified time it is
terminated and put into a failure state. Note that this setting does not
have any effect on Type=oneshot services, as they terminate immediately
after activation completed. Pass "infinity" (the default) to configure
no runtime limit.
If a service of Type=notify sends "EXTEND_TIMEOUT_USEC=…", this may
cause the runtime to be extended beyond RuntimeMaxSec=. The first
receipt of this message must occur before RuntimeMaxSec= is exceeded,
and once the runtime has exended beyond RuntimeMaxSec=, the service
manager will allow the service to continue to run, provided the service
repeats "EXTEND_TIMEOUT_USEC=…" within the interval specified until the
service shutdown is acheived by "STOPPING=1" (or termination). (see
sd_notify(3)).
---
Aparentemente esto no funciona para typo oneshot, quizas deberias ver si
en lugar de oneshot te trabaja mejor con Type=simple
--
Salu2, Ulinx
"En un problema con n ecuaciones
siempre habrá al menos n+1 incógnitas"
Linux user 366775