Skip to content

Instantly share code, notes, and snippets.

@KaroAntonio
Last active September 5, 2018 14:30
Show Gist options
  • Save KaroAntonio/9db053b7069abfe3ab313abd4a35e4eb to your computer and use it in GitHub Desktop.
Save KaroAntonio/9db053b7069abfe3ab313abd4a35e4eb to your computer and use it in GitHub Desktop.
renew ssl
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