No Crontab on macOS Big Sur...?

Domain: fm.4633.se
Web server: Apache
OS: macOS Big Sur 11.6.1

I have just installed brew and certbot, and it seems to work fine.
Instructions were found here: Certbot Instructions | Certbot

I automated this with this command:
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q" | sudo tee -a /etc/crontab > /dev/null

...and that came out with no error.

But when trying to confirm that the crontab was actually working I found out that Crontab is not longer a part of macOS.

What should I do to implement the automatic renewal of the cert?

Thanks,
Andreas

Where did you read this?

crond came preinstalled on my macOS Monterey system.

2 Likes

Thank you for your input! :+1:

I can't find the definitive thread about this now, but I got the impression that Crontab was abandoned in favour of Launchctl.

And I can't find any cron files on my system either. Crontab -l gives "no crontab for root" or the username. I just want to verify that the certbot actuallt renews when it should.

1 Like

I think launchd is recommended over using crond, but it is still functional:

Note: Although it is still supported, cron is not a recommended solution. It has been deprecated in favor of launchd .

That output from crontab -l is normal.

/etc/crontab didn't exist on my system either, but creating it using the command you mentioned, worked for me.

2 Likes

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