Cron not running django command

后端 未结 4 1420
后悔当初
后悔当初 2021-01-06 06:40

I have a django script that should be run at a specified time every day. I am trying to achieve this using crontab. The script is supposed to dump the database,

4条回答
  •  悲哀的现实
    2021-01-06 07:24

    That reminds me of a very frustrating gotcha. Do you have a newline at the end of your crontab file? From man crontab:

    ...cron requires that each entry in a crontab end in a newline character. If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it.

提交回复
热议问题