kaiyou 7 years ago
parent e53c0db60d
commit 921f9f73c3

@ -46,7 +46,9 @@ login_manager = flask_login.LoginManager()
login_manager.init_app(app) login_manager.init_app(app)
babel = flask_babel.Babel(app) babel = flask_babel.Babel(app)
translations = list(map(str, babel.list_translations())) translations = list(map(str, babel.list_translations()))
scheduler = background.BackgroundScheduler() scheduler = background.BackgroundScheduler({
'apscheduler.timezone': 'UTC'
})
# Manager commnad # Manager commnad
manager = flask_script.Manager(app) manager = flask_script.Manager(app)

@ -44,7 +44,7 @@ def certbot_install(domain):
@scheduler.scheduled_job('date') @scheduler.scheduled_job('date')
@scheduler.scheduled_job('cron', hour=96, minute=0) @scheduler.scheduled_job('cron', day='*/4', hour=0, minute=0)
def generate_cert(): def generate_cert():
print("Generating TLS certificates using Certbot") print("Generating TLS certificates using Certbot")
hostname = app.config["HOSTNAME"] hostname = app.config["HOSTNAME"]

Loading…
Cancel
Save