Crontab error on letsencrypt renew


#1

Cron <root@ip-172-31-17-95> ee site update mysite.com --letsencrypt=renew

/bin/sh: 1: ee: not found

I’m having this problem … automatic renewal of SSL simply does not happen. Returns as command not found!

My crontab 0 0 * * 0 ee site update --le=renew --all 2> /dev/null

Any suggestions on how to solve it?


#2

You must set your the PATH variable inside cron environment in such a way it covers all possible locations for your scripts.

Take a look at my own crontab, perhaps it might ring some bells.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
MAILTO=""
@reboot /scripts/initial-settings.sh
* * * * * service mysql status || service mysql start
* * * * * service nginx status || service nginx start
0 8 * * * service nginx rotate
44 2 * * * /bin/bash /scripts/pfbackup.sh > /var/log/pfbackup.log
0 0 * * 0 ee site update --le=renew --all 2> /dev/null # Renew all letsencrypt SSL cert. Set by EasyEngine

#3