Minor enhancement for crontab: skip use perl

As far as I can see, perl is only used for a random delay. This can be done in shell:

sh-4.3:/etc/cron.d$ diff certbot.old certbot
< 0 */12 * * * root test -x /usr/bin/certbot && perl -e 'sleep int(rand(3600))' && certbot -q renew
> 0 */12 * * * root test -x /usr/bin/certbot && sleep $(( RANDOM%3600 )) && certbot -q renew

BTW, thanks a lot for certbot.

1 Like

Just a question from me, because I don’t quite understand it: is this a certbot specific thing or a crontab thing? If the latter, which cron are you using? Because there are many different crons out there…

As far as I can tell now, the crons are (or should be) installed through the maintainer of the OS package. Or are you using certbot-auto? Although, that script doesn’t appear to add crons (yet).

Sorry, I did not know that things in crontab was related to the distribution. I run Debian and will file a bug-report there.

Case closed.

1 Like

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