当前位置:论坛首页 > Linux面板 > 求助

【已完成】计划任务有一些不会自动执行

发表在 Linux面板2023-12-6 18:06 [复制链接] 7 1097

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:8.0.4
系统版本:CentOS Stream 8 x86_64(Py3.7.9)
问题描述:我有一些计划任务。原来都是正常自动执行的。但升级后,就有一些不会自动执行。例如。隔10分钟的会自动执行,但1分钟的都不会。并有时候,计划执行只执行一半的命令,版面也修复过了。任务也重新添加过了。就是有这个问题求助。。。。
相关截图(日志、错误):

image_2023_12_06T10_03_46_936Z.png

以上的就是一分钟的不会自动执行。搞来搞去都这样。
使用道具 举报 只看该作者 回复
发表于 2023-12-7 09:15:29 | 显示全部楼层
您好,计划任务内的底层是调用服务系统内的cron服务进行执行的,您可以尝试重启cron服务:
  1. systemctl restart crond
复制代码


如果还是无法正常执行,则结合cron日志进行排查,日志路径:
  1. /var/log/cron
复制代码
使用道具 举报 回复 支持 反对
发表于 2023-12-7 16:58:24 | 显示全部楼层
你以上的重起办法,是无效的,后来我发现,所有一分钟的都会停的,但会在/www/server/cron下面产生一个.lock文件,如果把这个文删除就会自动执行,但过一些时候,又会产生,除了一分钟以外的。其它的例如10分钟,的就不会有这情况。

image_2023_12_07T08_54_29_809Z.png

以上就是两个1分钟分别产生的.lock文件。
使用道具 举报 回复 支持 反对
发表于 2023-12-7 17:01:12 | 显示全部楼层
Dec  7 16:30:01 localhost CROND[81526]: (root) CMD (/www/server/cron/f9b4d589f253c57cd411afd0df02620d >> /www/server/cron/f9b4d589f253c57cd411afd0df02620d.log 2>&1)
Dec  7 16:30:01 localhost CROND[81527]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:30:01 localhost CROND[81525]: (root) CMD (/www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117 >> /www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117.log 2>&1)
Dec  7 16:31:01 localhost CROND[81687]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:32:01 localhost CROND[81769]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:33:01 localhost CROND[81854]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:34:01 localhost CROND[81936]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:35:01 localhost CROND[82019]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:36:01 localhost CROND[82112]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:37:01 localhost CROND[82122]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:38:01 localhost CROND[82133]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:39:01 localhost CROND[82144]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:40:01 localhost CROND[82159]: (root) CMD (/www/server/cron/220ea224025ba4793a65e0b6a3179207 >> /www/server/cron/220ea224025ba4793a65e0b6a3179207.log 2>&1)
Dec  7 16:40:01 localhost CROND[82161]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:40:01 localhost CROND[82160]: (root) CMD (/www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117 >> /www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117.log 2>&1)
Dec  7 16:41:01 localhost CROND[82253]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:42:01 localhost CROND[82334]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:43:01 localhost CROND[82416]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:44:01 localhost CROND[82497]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:45:01 localhost CROND[82582]: (root) CMD (/www/server/cron/aefc3adeec5dd73e8fef0965da0954c3 >> /www/server/cron/aefc3adeec5dd73e8fef0965da0954c3.log 2>&1)
Dec  7 16:45:01 localhost CROND[82583]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:45:01 localhost CROND[82584]: (root) CMD (/www/server/cron/b84581cad8274a646d806e5ec1da3c85 >> /www/server/cron/b84581cad8274a646d806e5ec1da3c85.log 2>&1)
Dec  7 16:46:01 localhost CROND[82689]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:47:01 localhost CROND[82916]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:48:01 localhost CROND[82979]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:49:01 localhost crond[1084]: (root) RELOAD (/var/spool/cron/root)
Dec  7 16:49:01 localhost crond[1084]: (CRON) INFO (running with inotify support)
Dec  7 16:49:01 localhost CROND[83043]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:49:01 localhost CROND[83044]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:50:01 localhost CROND[83062]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:50:01 localhost CROND[83063]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:50:01 localhost CROND[83064]: (root) CMD (/www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117 >> /www/server/cron/5821e93bb0e2c45f08ab9e9166fdf117.log 2>&1)
Dec  7 16:51:01 localhost CROND[83249]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:51:01 localhost CROND[83251]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:52:01 localhost CROND[83470]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:52:01 localhost CROND[83471]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:53:01 localhost CROND[83633]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:53:01 localhost CROND[83634]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:54:01 localhost CROND[83725]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:54:01 localhost CROND[83726]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:55:01 localhost CROND[83814]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:55:01 localhost CROND[83815]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:56:01 localhost CROND[83902]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:56:01 localhost CROND[83903]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:57:01 localhost CROND[83989]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:57:01 localhost CROND[83990]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:58:01 localhost CROND[84077]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
Dec  7 16:58:01 localhost CROND[84078]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:59:01 localhost CROND[84164]: (root) CMD (flock -xn /www/server/cron/1a8900a93528a9275aece94a4d82d956.lock -c /www/server/cron/1a8900a93528a9275aece94a4d82d956 >> /www/server/cron/1a8900a93528a9275aece94a4d82d956.log 2>&1)
Dec  7 16:59:01 localhost CROND[84165]: (root) CMD (flock -xn /www/server/cron/73842f62793944897d440b528c33a644.lock -c /www/server/cron/73842f62793944897d440b528c33a644 >> /www/server/cron/73842f62793944897d440b528c33a644.log 2>&1)
使用道具 举报 回复 支持 反对
发表于 2023-12-7 17:02:02 | 显示全部楼层
以上为最后的最新日志。
使用道具 举报 回复 支持 反对
发表于 2023-12-14 22:03:05 | 显示全部楼层
我也是同样的问题,求大佬解惑
使用道具 举报 回复 支持 反对
发表于 2024-1-31 14:42:53 | 显示全部楼层
由于您的帖子长时间未回复,这边将帖子状态修改已完成,如您当前问题未解决,您可以重新在帖子内回复或者重新发帖子反馈,如是有新问题您可以重新发帖子反馈
使用道具 举报 回复 支持 反对
发表于 2024-1-31 14:43:40 | 显示全部楼层
谢花郎 发表于 2024-1-31 14:42
由于您的帖子长时间未回复,这边将帖子状态修改已完成,如您当前问题未解决,您可以重新在帖子内回复或者重 ...

请问下可以帮忙看下我的问题吗
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表