Scripts are intended to run frequiently. i.e once a day.
Here is an example crontab file to run them.
# # # cron.d/acme-certs -- schedules periodic certificate renewal via letsencrypt # # Copyright © Victor Wagner <vitus@wagner.pp.ru> # distributed under the terms of the MIT Licence ## By default run each night. It would start to do something week before # certificate expiration, so if letsencrypt would be down for some # reason, we have time to retry.
# # Check if certificates are going to be expired and generate new keys and CSRs # 58 4 * * * root /usr/local/sbin/create_csr # # If any unprocessed CSRs exist (or were created by previous run of # create_csr) sign it with letsencrypt # 18 5 * * * acme /usr/local/sbin/request_crt # # If there is some newly signed certs, deploy them. # 58 5 * * * root /usr/local/sbin/deploy_crt