INSERT INTO `la_dev_crontab` (`name`, `type`, `system`, `remark`, `command`, `params`, `status`, `expression`, `create_time`, `update_time`)
SELECT '爬虫错误报告邮件', 1, 0, '每分钟分发未恢复的定时任务企业微信告警', 'crawler', 'error_report', 1, '*/1 * * * *', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
WHERE NOT EXISTS (
    SELECT 1 FROM `la_dev_crontab` WHERE `command` = 'crawler' AND `params` = 'error_report' AND `delete_time` IS NULL
);

UPDATE `la_dev_crontab`
SET `name` = '爬虫错误报告邮件',
    `remark` = '每分钟分发未恢复的定时任务企业微信告警',
    `expression` = '*/1 * * * *',
    `update_time` = UNIX_TIMESTAMP()
WHERE `command` = 'crawler' AND `params` = 'error_report' AND `delete_time` IS NULL;
