Django custom command and cron

后端 未结 6 1846
刺人心
刺人心 2020-12-02 15:17

I want my custom made Django command to be executed every minute. However it seems like python /path/to/project/myapp/manage.py mycommand doesn\'t seem to work

6条回答
  •  鱼传尺愫
    2020-12-02 15:33

    cd /path/to/project/myapp && python manage.py mycommand
    

    By chaining your commands like this, python will not be executed unless cd correctly changes the directory.

提交回复
热议问题