Discuz后台计划任务不运行解决方法

 3976

Discuz后台计划任务不运行解决方法

解决办法一

直接删除内置的计划任务,如果删除不了的话,打开数据库删除pre_common_cron表这个计划任务,或者将后台计划任务中的可用性取消勾选。

解决办法二

以上办法都无法解决可以考虑重置这个表pre_common_cron,到数据库执行如下字段即可。

  1. DROP TABLE IF EXISTS pre_common_cron;
  2. CREATE TABLE `pre_common_cron` (
  3.     `cronid` smallint(6) unsigned NOT NULL auto_increment,
  4.     `available` tinyint(1) NOT NULL default '0',
  5.     `type` enum('user','system','plugin') NOT NULL default 'user',
  6.     `name` char(50) NOT NULL default '',
  7.     `filename` char(50) NOT NULL default '',
  8.     `lastrun` int(10) unsigned NOT NULL default '0',
  9.     `nextrun` int(10) unsigned NOT NULL default '0',
  10.     `weekday` tinyint(1) NOT NULL default '0',
  11.     `day` tinyint(2) NOT NULL default '0',
  12.     `hour` tinyint(2) NOT NULL default '0',
  13.     `minute` char(36) NOT NULL default '',
  14.     PRIMARY KEY (`cronid`),
  15. KEY `nextrun` (`available`,`nextrun`)
  16. ) ENGINE=MyISAM DEFAULT CHARSET=gbk AUTO_INCREMENT=22 ;
  17.  
  18. INSERT INTO `pre_common_cron` (`cronid`, `available`, `type`, `name`, `filename`, `lastrun`, `nextrun`, `weekday`, `day`, `hour`, `minute`) VALUES?
  19. (1, 1, 'system', '清空今日发帖数', 'cron_todaypost_daily.php', 1416342963, 1416412800, -1, -1, 0, '0'),
  20. (2, 1, 'system', '清空本月在线时间', 'cron_onlinetime_monthly.php', 1414791807, 1417363200, -1, 1, 0, '0'),
  21. (3, 1, 'system', '每日数据清理', 'cron_cleanup_daily.php', 1416357390, 1416432600, -1, -1, 5, '30'),
  22. (5, 1, 'system', '每日公告清理', 'cron_announcement_daily.php', 1416346616, 1416412800, -1, -1, 0, '0'),
  23. (6, 1, 'system', '限时操作清理', 'cron_threadexpiry_hourly.php', 1416357391, 1416358800, -1, -1, -1, '0'),
  24. (7, 1, 'system', '论坛推广清理', 'cron_promotion_hourly.php', 1416347376, 1416412800, -1, -1, 0, '00'),
  25. (8, 1, 'system', '每月主题清理', 'cron_cleanup_monthly.php', 1414860761, 1417384800, -1, 1, 6, '00'),
  26. (9, 1, 'system', '道具自动补货', 'cron_magic_daily.php', 1416347946, 1416412800, -1, -1, 0, '0'),
  27. (10, 1, 'system', '每日验证问答更新', 'cron_secqaa_daily.php', 1416357391, 1416434400, -1, -1, 6, '0'),
  28. (11, 1, 'system', '每日标签更新', 'cron_tag_daily.php', 1416347946, 1416412800, -1, -1, 0, '0'),
  29. (12, 1, 'system', '每日勋章更新', 'cron_medal_daily.php', 1416347947, 1416412800, -1, -1, 0, '0'),
  30. (13, 1, 'system', '清理过期动态', 'cron_cleanfeed.php', 1416347948, 1416412800, -1, -1, 0, '0'),
  31. (14, 1, 'system', '每日获取安全补丁', 'cron_checkpatch_daily.php', 1416353617, 1416421320, -1, -1, 2, '22'),
  32. (15, 1, 'system', '定时发布主题', 'cron_publish_halfhourly.php', 1416357391, 1416358800, -1, -1, -1, '0 30'),
  33. (16, 1, 'system', '每周广播归档', 'cron_follow_daily.php', 1416350694, 1416420000, -1, -1, 2, '0'),
  34. (17, 1, 'system', '更新每日查看数', 'cron_todayviews_daily.php', 1416357389, 1416423600, -1, -1, 3, '0 5 10 15 20 25 30 35 40 45 50 55'),
  35. (18, 0, 'system', '每日用户表优化', 'cron_member_optimize_daily.php', 1377225651, 0, -1, -1, 2, '0 5 10 15 20 25 30 35 40 45 50 55'),
  36. (19, 0, 'user', '防水墙每日优化', 'cron_security_daily.php', 1416351485, 1416420000, -1, -1, 2, '0'),
  37. (20, 1, 'system', '统计今日热帖', 'cron_todayheats_daily.php', 1416348808, 1416412800, -1, -1, 0, '0'),
  38. (21, 0, 'user', '更新版块最后发表(防水墙相关)', 'cron_security_cleanup_lastpost.php', 0, 0, -1, -1, -1, '0');

到此问题即可解决。


本文网址:https://www.zztuku.com/detail-9237.html
站长图库 - Discuz后台计划任务不运行解决方法
申明:如有侵犯,请 联系我们 删除。

评论(0)条

您还没有登录,请 登录 后发表评论!

提示:请勿发布广告垃圾评论,否则封号处理!!

    编辑推荐