Just check if cert is about to expire

Hi all,
Below is my crontab record

  • 7,19 * * 2 /usr/bin/certbot renew --cert-name example.com > /dev/null

I was trying to reduce amount of messages in my root inbox and thus redirected output to /dev/null, but the message just became shorter. So my question is, how do I check days till expire and run above command only if the amount of days is less than 30?
Please advise.

1 Like

The command >/dev/null only redirects the standard output to /dev/null. Everything on the standard error stream still comes through.

Try adding the --quiet (or -q) flag. Also outputting the standard error stream to /dev/null could lead to failures being missed.


Thanks, applied --quiet parameter.

1 Like

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