0

This question already has an answer here:

I have cron task for root that should run daily:

$ whoami
main_usr

$ sudo crontab -l  -u root

0 23 * * * certbot renew --cert-name app.my_domain123.com --pre-hook "systemctl nginx stop" --post-hook "systemctl nginx start" >& /home/my_user123/cron_renew_certificate.log

It's been a few days already, the file /home/my_user123/cron_renew_certificate.log doesn't exist.

Does it run at all? How can I make sure that it does? If not, why not?

marked as duplicate by Kusalananda linux Apr 2 at 17:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    >& is a bashism iirc - are you sure cronjobs run in bash on your system? – steeldriver Apr 2 at 17:11
  • @steeldriver yes – jijino Apr 2 at 22:51