カテゴリー
Linux

Cron JobでCertbotを自動で実行しLogする

以下は、毎月28日の9時17分にcertbot renew とnginxのリスタートを実行し、その結果をcertbot_renew_logファイルにlogするcron jobです。taskを( )で囲まないとlogできませんでした。

17  9  28  *  *  (certbot renew  && systemctl restart nginx) >> /var/log/certbot_renew_log 2>&1