Which cronjob entry?

Which cronjob entry is correct? Should I remove one or does it need both?

0 */12 * * * root test -x /usr/bin/certbot -a ! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' &&
certbot>

0 */12 * * * /bin/certbot renew && systemctl reload apache2

It definitely doesn't need two; It can all be done in one.
That said, I'd prefer replacing both with a mix of them.
Taking the sleep from the first and the reload from the second.
As for the certbot path, I'd check which certbot to confirm that.

If I had to choose only one: Keep the first one.
[but make sure it actually runs]

3 Likes

If your Certbot is up to date enough (0.29.0 or newer), the sleep command in the cronjob isn't necessary any longer: Certbot will sleep itself when ran if it detects it's not being run from an interactive CLI.

That said, it's alsno no problem to have two delays, they're rather short. :slight_smile:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.