restarting from cron users’s service with a random delay

sometimes things are not as stable and not-leaky as they should be.

/etc/cron.d/restart :

37 * * * 0 root /usr/bin/sleep $(( RANDOM \% 60 )) ;  /usr/bin/su - username -c  "export XDG_RUNTIME_DIR=/run/user/$(id -u username); /usr/bin/systemctl restart eventstreamingapi --user"

Leave a Reply

Your email address will not be published. Required fields are marked *

(Spamcheck Enabled)