Last active
September 5, 2018 14:30
-
-
Save KaroAntonio/9db053b7069abfe3ab313abd4a35e4eb to your computer and use it in GitHub Desktop.
renew ssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import schedule | |
import time | |
from subprocess import call | |
def renew_ssl_cert(): | |
print('RENEW CERT') | |
call(['certbot-auto', 'renew']) | |
schedule.every(30).days.do(renew_ssl_cert) | |
while True: | |
print('RUN PENDING :: ' + str(datetime.now())) | |
schedule.run_pending() | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment