Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crontab job fails when FLASK_APP has brackets #13

Open
avinlg opened this issue Oct 23, 2024 · 0 comments
Open

Crontab job fails when FLASK_APP has brackets #13

avinlg opened this issue Oct 23, 2024 · 0 comments

Comments

@avinlg
Copy link

avinlg commented Oct 23, 2024

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 <project path> && FLASK_APP=app:create_app() <path to environment>/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()'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant