frostming / frostming/flask-crontab

Crontab job fails when FLASK_APP has brackets

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
101
Forks
7
PR merge metrics
No merged PRs in 30d

Description

When passing apllication factory to FLASK_APP, i.e. FLASK_APP=app:create_app(), cron fails.

Environment:
`FLASK_APP=app:create_app()`

Crontab command created:
`cd && FLASK_APP=app:create_app() /bin/python -m flask crontab run 4cee55ee21b006de06c75e2c2f469f81`

Expected output:
Command should excecute

Error:
`bash: syntax error near unexpected token \`('`

Solution:
Wrap FLASK_APP value in quotes
i.e. `FLASK_APP='app:create_app()'`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.