How can I run a django management command by cron job

前端 未结 2 1962
太阳男子
太阳男子 2021-01-01 00:23

I am working with a django app called django-mailbox. The purpose of this is to import email messages via pop3 and other protocols and store them in a db. I want to do this

2条回答
  •  孤独总比滥情好
    2021-01-01 01:17

    If you are using a virtual env use the python binary from the virtualenv

    * * * * * /path/to/virtualenv/bin/python /path/to/project/manage.py management_command
    

提交回复
热议问题