|
from flask import current_app
|
|
|
|
from flaschengeist.utils.HTTP import no_content
|
|
|
|
_scheduled = set()
|
|
|
|
|
|
def scheduled(func):
|
|
_scheduled.add(func)
|
|
return func
|
|
|
|
|
|
@current_app.route("/cron")
|
|
def __run_scheduled():
|
|
for function in _scheduled:
|
|
function()
|
|
return no_content()
|