My Certbot Auto Renew Error

So, I have received a notification in my email that my domain has not been successfully renewed Let's Encrypt certificate expiration notice for domain "mydomain" from Let's Encrypt Expiry Bot.

and I have set up certbot auto-renew quiet in my crontab before too. How's this possible?

First, I have to recheck my crontab again with the following:

crontab -e

and then found the certbot command line : /usr/bin/certbot renew –quiet

And when I try to execute the command:

root@server:~# /usr/bin/certbot renew –quiet
-bash: /usr/bin/certbot: No such file or directory

Oops, looks like my certbot is not located in /usr/bin/certbot,

to see where the certbot is, run:

which certbot

Output:

root@server:~# which certbot
/usr/local/bin/certbot

this command tells that certbot is located in /usr/local/bin/certbot, now time to replace the crontab, run crontab -e again and then replace it too:

15 3 * * * /usr/local/bin/certbot renew –quiet

and finally, my Certbot worked again.