python - django_cron 似乎没有锁定任务
问题描述
我正在使用 django 1.10 和 django_cron 包(0.5.0)。
该软件包默认情况下会在任务运行时锁定任务,因此它不会在其他服务器上运行。似乎在我们的项目中(托管在 3 个服务器上) - 它每小时运行 3 次(这是时间表)我没有更改配置中的任何内容,因为我知道它应该默认锁定任务。
这是任务:
class CreateMissingItems(CronJobBase):
RUN_EVERY_MINS = 60
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
code = 'CreateMissingItems' # a unique id
def do(self):
MyLog().info(message="Starting scheduled task of creating missing items")
call_command('create_missing_items')
crontab 任务基本上每 20 分钟运行一次。我错过了什么吗?
解决方案
推荐阅读
- bash - Inotifywait 仅第一次执行 bash 脚本
- javascript - Javascript XLSX 库解析文件不正确
- python - 如何使用 and 运算符合并 2 个字符串列表
- pandas - Seaborn: Sorting countplot by ascending
- c# - 牢不可破的循环
- google-web-designer - Google Web Designer 图库
- audio - 无法为“ffmpeg”找到合适的输出格式,用于将 mp4 音频与 mp4 音频连接起来
- tkinter - 请告诉我有更好的方法来设置 ScrolledText 视图窗口
- amazon-cloudwatch - 如何判断 cloudwatch 中的哪个日志流触发了警报
- c# - unity PropertyAttribute,干扰其他 PropertyAttributes