run from a flask-script manager