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

How to call a command with no-value arguments #122

Open
cruzlutor opened this issue Jan 16, 2021 · 0 comments
Open

How to call a command with no-value arguments #122

cruzlutor opened this issue Jan 16, 2021 · 0 comments

Comments

@cruzlutor
Copy link

Environment & Versions

  • Operating system: Mac
  • Python: 3.x.x
  • Django: 3.1.5
  • django-crontab: 0.7.1

Hello everyone, I'm struggling with something, how should I call a command with no-value arguments? I'm using dbbackup and I need to pass the -c value for cleaning ./manage.py dbbackup -c, which one of the following options is the right one?

 ('0 0 * * *', 'django.core.management.call_command', ['dbbackup -c'])
 ('0 0 * * *', 'django.core.management.call_command', ['dbbackup', '-c'])
 ('0 0 * * *', 'django.core.management.call_command', ['dbbackup'], {'c': None})

Thanks in advance!

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