{"id":282787,"date":"2023-09-16T04:04:01","date_gmt":"2023-09-15T20:04:01","guid":{"rendered":"https:\/\/lrxjmw.cn\/ljhrwrj.html"},"modified":"2023-09-16T04:04:01","modified_gmt":"2023-09-15T20:04:01","slug":"ljhrwrj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ljhrwrj.html","title":{"rendered":"Linux\u8ba1\u5212\u4efb\u52a1\u8f6f\u4ef6"},"content":{"rendered":"
1\u3001\u8ba1\u5212\u4efb\u52a1\u8003\u91ca\uff1b<\/p>\n
\u8ba1\u5212\u4efb\u52a1\uff0c\u662f\u4efb\u52a1\u5728\u7ea6\u5b9a\u7684\u65f6\u95f4\u6267\u884c\u65e9\u5df2\u8ba1\u5212\u597d\u7684\u5de5\u4f5c\uff0c\u8fd9\u662f\u8868\u9762\u7684\u610f\u601d\u3002\u5728Linux<\/a>\u4e2d\uff0c\u6211\u4eec\u5e38\u5e38\u7528\u5230 crond \u670d\u52a1\u5668\u6765\u5b8c\u6210\u8fd9\u9879\u5de5\u4f5c\u3002cron\u670d\u52a1\u5668\u53ef\u4ee5\u6309\u7167\u914d\u7f6e\u6587\u4ef6\u7ea6\u5b9a\u7684\u65f6\u95f4\u6765\u6267\u884c\u7279\u5b9a\u7684\u4f5c\u52a1\u3002\u6bd4\u5982\u6211\u4eec\u53ef\u4ee5\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u7ea6\u5b9a\u6bcf\u665a\u65e9\u4e0a4\u70b9\uff0c\u5bf9httpd \u670d\u52a1\u5668\u91cd\u65b0\u542f\u52a8\uff0c\u8fd9\u5c31\u662f\u4e00\u4e2a\u8ba1\u5212\u4efb\u52a1\uff1b<\/p>\n \u4e0b\u9762\u6211\u4eec\u5148\u6765\u8c08\u8c08cron\uff1b<\/p>\n 2\u3001cron\uff1b<\/p>\n \u5728Linux\u7cfb\u7edf<\/a>\u4e2d\uff0c\u8ba1\u5212\u4efb\u52a1\u901a\u5e38\u662f\u7531cron\u627f\u5f53\uff0c\u6211\u4eec\u53ef\u4ee5\u628acron\u8bbe\u7f6e\u4e3a\u5f00\u673a\u65f6\u624b\u52a8\u542f\u52a8\u3002cron\u542f\u52a8\u540e\uff0c\u5b83\u4f1a\u8bfb\u53d6\u5b83\u7684\u6240\u6709\u914d\u7f6e\u6587\u4ef6\uff08\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\/etc\/crontab<\/a>\uff0c\u4ee5\u53ca\u6bcf\u4f4d\u7528\u6237\u7684\u8ba1\u5212\u4efb\u52a1\u914d\u7f6e\u6587\u4ef6\uff09\uff0c\u7136\u540ecron\u4f1a\u6309\u7167\u547d\u4ee4<\/a>\u548c\u6267\u884c\u65f6\u95f4\u6765\u6309\u91cf\u6765\u8c03\u7528\u5ea6\u5de5\u4f5c\u4efb\u52a1\u3002<\/p>\n 2.1 cron \u7684\u5b89\u88c5\u548c\u542f\u52a8\uff1b<\/p>\n \u5728\u901a\u5e38\u60c5\u51b5\u4e0blinux\u5b66\u4e60\uff0ccron\u90fd\u662f\u7cfb\u7edf\u9ed8\u8ba4\u5b89\u88c5\u7684\uff0c\u6211\u4eec\u8981\u5b66\u4f1a\u67e5\u770b\u8f6f\u4ef6\u5305\u662f\u5426\u65e9\u5df2\u5b89\u88c5\uff1b<\/p>\n 2.1.1 \u5728Redhat \u6216 Fedora\u7b49RPM\u5305\u7ba1\u7406\u7684\u7cfb\u7edf\u7684\u5b89\u88c5\uff1b<\/p>\n \u5224\u65ad\u7cfb\u7edf\u662f\u5426\u65e9\u5df2\u5b89\u88c5cron\u76f8\u5173\u7684\u5305<\/p>\n Fedora 5.0 \u7cfb\u7edf\u7684\u60c5\u51b5\uff1b<\/p>\n \u5176\u5b83\u7248\u672c\u7684Fedora\u53caRedhat\u7684\u7cfb\u7edf\u548c\u8fd9\u76f8\u50cf\uff1b<\/p>\n [root@localhost ~]# rpm -qa |grep cron<\/p>\n vixie-cron-4.1-54.FC5<\/p>\n anacron-2.3-36.1<\/p>\n crontabs-1.10-7.1<\/p>\n \u5176\u4e2dvixie-cron\u8f6f\u4ef6\u5305\u662fcron\u7684\u4e3b\u7a0b\u5e8f\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4e0b\u8fb9\u7684\u547d\u4ee4\u6765\u4e86\u89e3\u5b83\uff0c\u5176\u5b83\u8f6f\u4ef6\u5305\u540c\u7406\uff1b<\/p>\n [root@localhost beinan]# rpm -ql vixie-cron<\/p>\n crontabs \u8f6f\u4ef6\u5305\u662f\u62ff\u6765\u5b89\u88c5\u3001\u5378\u88c5\u3001\u6216\u5217\u51fa\u62ff\u6765\u9a71\u52a8 cron \u5b88\u62a4\u8fdb\u7a0b\u7684\u8868\u683c\u7684\u7a0b\u5e8f\u3002cron \u5b88\u62a4\u8fdb\u7a0b\u68c0\u6d4b crontab \u6587\u4ef6\u6765\u67e5\u770b\u67d0\u4e2a\u6307\u5b9a\u547d\u4ee4\u88ab\u8c03\u5ea6\u6267\u884c\u7684\u65f6\u95f4\u3002\u5982\u679c\u547d\u4ee4\u5df2\u7136\u8c03\u5ea6\uff0c\u5b88\u62a4\u8fdb\u7a0b\u90fd\u4f1a\u6267\u884c\u5b83\u4eec\u3002\u4e86\u89e3crontabs\u8f6f\u4ef6\u5305\u90fd\u5b89\u88c5\u4e86\u4e9b\u54ea\u4e9b\uff0c\u5e94\u8be5\u7528\u4e0b\u8fb9\u7684\u547d\u4ee4\uff1b<\/p>\n [root@localhost beinan]# rpm -ql crontabs<\/p>\n \u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4ece\u5149\u789f\u4e2d\u627e\u51fa\u6587\u4ef6\u540d\u5e26\u6709cron\u5b57\u6837\u7684\u8f6f\u4ef6\u5305\u6765\u5b89\u88c5\u3002<\/p>\n [root@localhost ~]# rpm -ivh vixie-cron-4.1-54.FC5*<\/p>\n [root@localhost ~]# rpm -ivh crontabs*<\/p>\n \u4e5f\u53ef\u4ee5\u7528yum \u6765\u5728\u7ebf\u5b89\u88c5\uff1b<\/p>\n [root@localhost ~]# yum install vixie-cron<\/p>\n [root@localhost ~]# yum install crontabs<\/p>\n 2.1.2 \u5728Slackware\u7cfb\u7edf\u4e2d\u7684\u5b89\u88c5\uff1b<\/p>\n \u5728Slackware\u4e2dcron\u8f6f\u4ef6\u5305\u662f dcron\uff0c\u60a8\u53ef\u4ee5\u5728\u5149\u789f\u4e2d\u627e\u4e0b\u6765\u5b89\u88c5\u5b83\uff1b<\/p>\n \u67e5\u770b\u662f\u5426\u65e9\u5df2\u5b89\u88c5\u4e86dcron\u8f6f\u4ef6\u5305\uff0c\u60a8\u53ef\u4ee5\u8fd9\u6837\u67e5\u770b\u3002\u5728\u8fd9\u513f\u80fd\u5217\u4e3e\u8f6f\u4ef6\u5305\u8be6\u5c3d\u7684\u5b89\u88c5\u60c5\u51b5\uff1b<\/p>\n [root@localhost ~]# more \/var\/adm\/packages\/dcron*<\/p>\n <\/p>\n \u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u8bf7\u7528\u4e0b\u8fb9\u7684\u547d\u4ee4\u6765\u5b89\u88c5\u3002\u5728\u7b2c\u4e00\u5f20\u5b89\u88c5\u76d8\u4e2d\u627e\u51fadcron\u8f6f\u4ef6\u5305\uff1b<\/p>\n [root@localhost ~]# installpkg dcron*.tgz<\/p>\n 2.1.3 cron \u7684\u5f00\u542f\u3001\u505c\u6b62\u3001\u91cd\u65b0\u542f\u52a8\u65b9\u5f0f\uff1b<\/p>\n cron\u914d\u7f6e\u6587\u4ef6\u88ab\u66f4\u6539\u540e\uff0c\u60f3\u8ba9\u65b0\u6587\u4ef6\u751f\u6548\uff0c\u5fc5\u987b\u91cd\u65b0crond\u670d\u52a1\u5668\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f\u53ef\u4f9b\u9009\u62e9\uff1b<\/p>\n \u7b2c\u4e00\u79cd \u5728Fedora\u6216Redhat \u7b49\u4ee5RPM\u5305\u7ba1\u7406\u7684\u7cfb\u7edf\u4e2d\uff1b<\/p>\n [root@localhost ~]# \/etc\/init.d\/crond start<\/p>\n [root@localhost ~]# \/etc\/init.d\/crond stop<\/p>\n [root@localhost ~]# \/etc\/init.d\/crond restart<\/p>\n \u5982\u679c\u60f3\u5728Fedora \u548c Redhat \u6216\u4ee5\u8fd9\u79cd\u53d1\u884c\u7248\u4e3a\u57fa\u7840\u514b\u9686\u7684\u53d1\u884c\u7248\uff0c\u5982\u679c\u60f3\u624b\u52a8\u5f00\u673a\u8fd0\u884c\uff0c\u8bf7\u7528\u4e0b\u8fb9\u7684\u529e\u6cd5\uff1b<\/p>\n [root@localhost ~]# chkconfig --levels 35 crond on<\/p>\n \u7b2c\u4e8c\u79cd\uff1a\u901a\u7528<\/p>\n [root@localhost ~]# pgrep crond \u6ce8\uff1a\u5224\u65adcrond \u662f\u5426\u5728\u8fd0\u884c\uff1b<\/p>\n [root@localhost ~]# pkill crond \u6ce8\uff1a\u6740\u6389\u6b63\u5728\u8fd0\u884c\u4e2d\u7684crond\uff1b<\/p>\n [root@localhost ~]# pgrep crond \u6ce8\uff1a\u67e5\u770b\u662f\u5426\u88ab\u6740\u6389\u4e86\uff1b<\/p>\n [root@localhost ~]# \/usr\/sbin\/crond \u6ce8\uff1a\u8fd0\u884ccrond\uff1b<\/p>\n 2.2 cron \u914d\u7f6e\u6587\u4ef6\uff1b<\/p>\n cron \u662f\u4e00\u4e2a\u670d\u52a1\u5668\u7a0b\u5e8f\uff0c\u6211\u4eec\u90fd\u6653\u5f97Linux\u7684\u670d\u52a1\u5668\u7684\u914d\u7f6e\uff0c\u5927\u591a\u662f\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u6765\u5b8c\u6210\u7684\uff0ccron\u81ea\u7136\u4e5f\u4e0d\u4f8b\u5916\uff0c\u5728Redhat\/Fedora \u7b49\u7cfb\u7edf\u4e2d\u5b83\u7684\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u662f\/etc\/crontab\uff1b\u5728Slackware\u7cfb\u7edf\u4e2d\uff0c\u5168\u5c40\u6027\u6587\u4ef6\u662f \/var\/spool\/cron\/crontabs\/root \u3002\u6bcf\u4e2a\u7528\u6237\u4e5f\u6709\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7crontab -e \u6765\u7f16\u8f91\u5b83\uff1b<\/p>\n 2.2.1 \u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\uff1b<\/p>\n \u4e0b\u9762\u662f\u4e00\u4e2a\u5168\u5c40\u6027\u7684\u914d\u7f6e\u6587\u4ef6\u4e8b\u4f8b\uff0c\u4ee5Fedora Core 5\u4e3a\u4f8b\uff1b<\/p>\n [root@localhost ~]# more \/etc\/crontab<\/p>\n SHELL=\/bin\/bash<\/p>\n PATH=\/sbin:\/bin:\/usr\/sbin:\/usr\/bin<\/p>\n MAILTO=root<\/p>\n HOME=\/<\/p>\n # run-parts<\/p>\n 1 * * * * root run-parts \/etc\/cron.hourly<\/p>\n 2 4 * * * root run-parts \/etc\/cron.daily<\/p>\n <\/p>\n 22 4 * * 7 root run-parts \/etc\/cron.weekly<\/p>\n 42 4 1 * * root run-parts \/etc\/cron.monthly<\/p>\n 0,5,10,15,20,25,30,35,40,45,50,55 * * * * root \/usr\/bin\/mrtg \/etc\/mrtg\/mrtg.cfg<\/p>\n \u5bf9\u4e8e\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u8981\u7528root\u6743\u9650\u6765\u4fee\u6539\uff0c\u4e00\u822c\u662f\u901a\u8fc7crontab -e \u6765\u66f4\u6539\u3002\u4f46\u6709\u65f6\u4e5f\u5e76\u4e0d\u4e00\u5b9a\u662f\u8fd9\u6837\u7684\uff0c\u6bd4\u5982Fedora Core 5 \u5982\u679c\u901a\u8fc7crontab -e \u4fee\u6539\u7684\u662froot\u7528\u6237\u7684cron \u914d\u7f6e\u6587\u4ef6\u3002\u6240\u4ee5\u6211\u4eec\u8981\u5728Fedora Core 5\u4e2d\u66f4\u6539\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u53ef\u4ee5\u7528vi \u7f16\u8f91\u5668\u6765\u66f4\u6539\u3002vi\u7684\u7528\u6cd5\u8bf7\u53c2\u8003\uff1a\u300a\u6587\u4ef6\u7f16\u8f91\u5668 vi\u300b<\/p>\n \u5728\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5b9a\u4e49\u4e86\u53ef\u6267\u884c\u547d\u4ee4\u7684\u8def\u5f84\u73af\u5883\u53d8\u91cf\uff0c\u6240\u7528SHELL\u7c7b\u578b\u7684\u5b9a\u4e49\u7b49\uff0c\u8fd9\u4e9b\u5927\u591a\u4e0d\u7528\u66f4\u6539\uff1b\u6211\u4eec\u5e38\u5e38\u6dfb\u52a0\u7684\u662f\u8ba1\u5212\u4efb\u52a1\u6216\u66f4\u6539\u4efb\u52a1\u6267\u884c\u7684\u65f6\u95f4\u7b49\uff1b<\/p>\n \u5728\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u53d1\u89c9\u6709\u7c7b\u4f3c\u8fd9\u79cd\u884c\uff1b<\/p>\n 1 * * * * root run-parts \/etc\/cron.hourly \u6ce8\uff1a\u8868\u793a\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c\u4e00\u5206\u949f\uff0c\u5f00\u59cb\u6267\u884c\/etc\/hourly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 2 4 * * * root run-parts \/etc\/cron.daily \u6ce8\uff1a\u8868\u793a\u6bcf\u665a\u76844\u70b92\u5206\uff0c\u5f00\u59cb\u6267\u884c\/etc\/cron.daily\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 22 4 * * 7 root run-parts \/etc\/cron.weekly \u6ce8\uff1a\u6bcf\u5e74\u7b2c7\u4e2a\u54684\u70b9\u621122\u5206\uff0c\u5f00\u59cb\u6267\u884c \/etc\/cron.weekly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 42 4 1 * * root run-parts \/etc\/cron.monthly \u6ce8\uff1a\u6bcf\u6708\u7b2c1\u5929\u76844\u70b942\u5206\uff0c\u5f00\u59cb\u6267\u884c\/etc\/cron.monthly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n \u8fd9\u4e9b\u884c\u662f\u62ff\u6765\u5728\u540c\u4e00\u65f6\u95f4\u6279\u91cf\u6267\u884c\u4efb\u52a1\u7684\uff0c\u6211\u4eec\u5728\u4e4b\u540e\u7684\u4e8b\u4f8b\u4e2d\u72ec\u7acb\u4e0b\u6765\u89e3\u8bf4\uff0c\u5728\u8fd9\u513f\u53ea\u662f\u8ba9\u4f60\u4eec\u5fc3\u4e2d\u6709\u6570\uff1b<\/p>\n 2.2.2 cron \u914d\u7f6e\u8ba1\u5212\u4efb\u52a1\u7684\u4e66\u5199\u683c\u5f0f<\/p>\n \u5206\u949f \u5c0f\u65f6 \u65e5 \u6708 \u5468 \uff3b\u7528\u6237\u540d\uff3d \u547d\u4ee4<\/p>\n \u8bf4\u660e\uff1a<\/p>\n \u7b2c\u4e00\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5206\u949f\uff0c\u8868\u793a\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c\u51e0\u5206\u949f\u6765\u6267\u884c\u3002\u8303\u56f4\u662f\u4ece0-59<\/p>\n \u7b2c\u4e8c\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5c0f\u65f6\uff0c\u8868\u793a\u4ece\u7b2c\u51e0\u4e2a\u5c0f\u65f6\u6765\u6267\u884c\uff0c\u8303\u56f4\u662f\u4ece0-23<\/p>\n \u7b2c\u4e09\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u65e5\u671f\uff0c\u8868\u793a\u4ece\u6bcf\u4e2a\u6708\u7684\u7b2c\u51e0\u5929\u6267\u884c\uff0c\u8303\u56f4\u4ece1-31<\/p>\n \u7b2c\u56db\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u6708\uff0c\u8868\u793a\u6bcf\u5e74\u7684\u7b2c\u51e0\u4e2a\u6708\u6765\u6267\u884c\uff0c\u8303\u56f4\u4ece1-12<\/p>\n \u7b2c\u4e94\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5468\uff0c\u8868\u793a\u6bcf\u5468\u7684\u7b2c\u51e0\u5929\u6267\u884c\uff0c\u8303\u56f4\u4ece0-6\uff0c\u5176\u4e2d 0\u8868\u793a\u661f\u671f\u65e5\u3002<\/p>\n \u6bcf\u516d\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u7528\u6237\u540d\uff0c\u4e5f\u5c31\u662f\u6267\u884c\u7a0b\u5e8f\u8981\u901a\u8fc7\u90a3\u4e2a\u7528\u6237\u6765\u6267\u884c\uff0c\u8fd9\u4e2a\u901a\u5e38\u53ef\u4ee5\u7701\u7565\uff1b<\/p>\n \u7b2c\u4e03\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u6267\u884c\u7684\u547d\u4ee4\u548c\u53c2\u6570\u3002<\/p>\n \u6ce8\uff1a\u5176\u4e2d\u7528\u6237\u540d\u800c\u4e14\u7701\u7565\uff0c\u7528\u6237\u540d\u5b9a\u4e49\u7684\u662f\u7a0b\u5e8f\u7528\u90a3\u4e2a\u7528\u6237\u6765\u6267\u884c\uff0c\u6bd4\u5982mysql\u670d\u52a1\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u6210\u4ee5mysql\u7528\u6237\u6765\u542f\u52a8\u3001\u505c\u6b62\u3001\u91cd\u65b0\u542f\u52a8\uff0c\u8fd9\u65f6\u8981\u5199\u4e0a\u7528\u6237\u540d\uff1b\u4e0d\u8fc7\u5bf9\u4e8ecron\u6765\u8bf4\u610f\u4e49\u4e0d\u662f\u592a\u5927\uff0c\u56e0\u4e3a\u6bcf\u4f4d\u7528\u6237\u90fd\u6709\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6\u3002\u6709\u4e9b\u7a0b\u5e8f\u7684\u542f\u52a8\u5fc5\u987b\u7528\u5230root\u7528\u6237\uff0c\u8fd9\u65f6\u6211\u4eec\u5c31\u53ef\u4ee5\u66f4\u6539root\u7528\u6237\u7684cron\u914d\u7f6e\u6587\u4ef6\u5c31\u884c\u4e86\u3002\u5728\u6bcf\u4f4d\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4e0d\u5fc5\u6307\u5b9a\u7528\u6237\u540d\u3002<\/p>\n \u6211\u4eec\u53ef\u4ee5\u628a\u8ba1\u5212\u4efb\u52a1\u5199\u5728\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5982\u679c\u60a8\u60f3\u628a\u4e00\u4e2a\u8ba1\u5212\u88c5\u5165\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5c31\u5f97\u6539\u53d1\u884c\u7248\u6240\u5bf9\u5e94\u7684cron\u5168\u5c40\u914d\u7f6e\u6587\u4ef6\uff0c\u6bd4\u5982Fedora 5\u7684\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u662f\/etc\/crontab\u6587\u4ef6\uff1b<\/p>\n \u6bcf\u4e2a\u7528\u6237\u4e5f\u80fd\u5b9a\u4e49\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6\uff0c\u7528crontab -e \u547d\u4ee4\u6765\u5b9a\u4e49\uff1b<\/p>\n \u4e3e\u4e00\u4f8b\uff1a\u8ba9\u673a\u5668\u5728\u6bcf\u665a8\u70b930\u5206\u91cd\u65b0\u542f\u52a8\uff1b<\/p>\n \u5173\u4e8e\u65f6\u95f4\u683c\u5f0f\u4e2d\u67097\u4e2a\u6570\u7ec4\u3002\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u4fee\u6539\u6216\u5219\u6dfb\u52a0\uff0c\u5f53\u7136\u8fd9\u662f\u7cfb\u7edf\u4efb\u52a1\u8c03\u7528\u3002\u4e3e\u4e2a\u4e8b\u4f8blinux \u8ba1\u5212\u4efb\u52a1\u6ca1\u6267\u884c<\/strong>\uff0c\u6bd4\u5982\u6211\u5728\u6bcf\u665a\u7684\u65e9\u4e0a8\u70b930\u5206\u91cd\u65b0\u542f\u52a8\u673a\u5668\uff0c\u5c31\u53ef\u4ee5\u5728<\/p>\n \/etc\/crontab\u4e2d\u52a0\u5165\u4e0b\u8fb9\u7684\u4e24\u53e5\uff0c\u7b2c\u4e00\u53e5\u5c31\u662f\u6ce8\u91ca\u4e86\u3002\u4ee5#\u53f7\u5f00\u59cb\uff0c\u540e\u9762\u5199\u4e00\u4e2a\u81ea\u5df1\u80fd\u6653\u5f97\u8fd9\u662f\u54ea\u4e9b\u4efb\u52a1\u7684\u5907\u6ce8\uff1b<\/p>\n # reboot OS<\/p>\n 30 8 * * * root \/sbin\/reboot<\/p>\n \u7b2c\u4e00\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5206\u949f\uff0c\u8868\u793a\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c\u51e0\u5206\u949f\u6765\u6267\u884c\u3002\u8303\u56f4\u662f\u4ece0-59<\/p>\n \u7b2c\u4e8c\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5c0f\u65f6\uff0c\u8868\u793a\u4ece\u7b2c\u51e0\u4e2a\u5c0f\u65f6\u6765\u6267\u884c\uff0c\u8303\u56f4\u662f\u4ece0-23<\/p>\n \u7b2c\u4e09\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u65e5\u671f\uff0c\u8868\u793a\u4ece\u6bcf\u4e2a\u6708\u7684\u7b2c\u51e0\u5929\u6267\u884c\uff0c\u8303\u56f4\u4ece1-31<\/p>\n \u7b2c\u56db\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u6708\uff0c\u8868\u793a\u6bcf\u5e74\u7684\u7b2c\u51e0\u4e2a\u6708\u6765\u6267\u884c\uff0c\u8303\u56f4\u4ece1-12<\/p>\n \u7b2c\u4e94\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u5468\uff0c\u8868\u793a\u6bcf\u5468\u7684\u7b2c\u51e0\u5929\u6267\u884c\uff0c\u8303\u56f4\u4ece0-6\uff0c\u5176\u4e2d 0\u8868\u793a\u661f\u671f\u65e5\u3002<\/p>\n \u6bcf\u516d\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u7528\u6237\u540d\uff0c\u4e5f\u5c31\u662f\u6267\u884c\u7a0b\u5e8f\u8981\u901a\u8fc7\u90a3\u4e2a\u7528\u6237\u6765\u6267\u884c\uff0c\u8fd9\u4e2a\u901a\u5e38\u53ef\u4ee5\u7701\u7565\uff1b<\/p>\n \u7b2c\u4e03\u6bb5\u5e94\u5f53\u5b9a\u4e49\u7684\u662f\uff1a\u6267\u884c\u7684\u547d\u4ee4\u548c\u53c2\u6570\u3002<\/p>\n \u5bf9\u6bd4\u524d\u9762\u7684\u53cd\u4f8b\u5c31\u6653\u5f97\uff0c30\u662f\u4e0d\u662f\u5206\u949f\uff1f\uff1f8\u662f\u4e0d\u662f\u5c0f\u65f6\uff1f\u5982\u679c\u6709*\u4ee3\u8868\u7684\u5730\u65b9\uff0c\u8868\u793a\u5168\u90e8\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6bcf\u4e2a\u6708\uff0c\u6bcf\u5929\uff0c\u6bcf\u661f\u671f\u90fd\u8981\u6267\u884c\u3002root \u8868\u793a\u7528root\u7528\u6237\u6267\u884c\uff0c\u547d\u4ee4\u662f\/sbin\/reboot \uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u7cfb\u7edf\u5728\u6bcf\u665a 8\u70b930\u5206\u91cd\u65b0\u542f\u52a8\uff1b<\/p>\n \u6211\u4eec\u53ef\u4ee5\u628a\u6bcf\u665a8\u70b930\u5206\u91cd\u65b0\u542f\u52a8\u7684\u8ba1\u5212\u4efb\u52a1\u5199\u5165cron\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u5728root\u7528\u6237\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\u5982\u679c\u5b9a\u4e49\u5728 root\u81ea\u5df1\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u8bf7\u7528root\u8eab\u5206\u6765\u6267\u884c crontab -e \u6765\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\uff1bcrontab -e \u8fdb\u5165\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\u7684\u8fc7\u7a0b\uff0c\u5176\u5b9e\u548cvi\u7684\u7528\u6cd5\u4e00\u6837\uff0c\u8bf7\u53c2\u770bvi \u7684\u7528\u6cd5\uff1a\u300a\u6587\u4ef6\u7f16\u8f91\u5668 vi\u300b<\/p>\n \u8ba9\u914d\u7f6e\u6587\u4ef6\u751f\u6548\uff1a\u5982\u679c\u8ba9\u914d\u7f6e\u6587\u4ef6\u751f\u6548\uff0c\u8fd8\u5f97\u91cd\u65b0\u542f\u52a8cron\uff0c\u5207\u8bb0\uff0c\u65e2\u7136\u6bcf\u4f4d\u7528\u6237\u4e0b\u7684cron\u914d\u7f6e\u6587\u4ef6\u66f4\u6539\u540e\u3002\u4e5f\u8981\u91cd\u65b0\u542f\u52a8cron\u670d\u52a1\u5668\u3002<\/p>\n \u5728Fedora \u548cRedhat\u4e2d\uff0c\u6211\u4eec\u5e94\u5f53\u7528\uff1b<\/p>\n [root@localhost ~]# \/etc\/init.d\/crond restart<\/p>\n \u5982\u679c\u8ba9crond \u5728\u5f00\u673a\u65f6\u8fd0\u884c\uff0c\u5e94\u8be5\u6539\u53d8\u5176\u8fd0\u884c\u7ea7\u522b\uff1b<\/p>\n [root@localhost ~]# chkconfig --levels 35 crond on<\/p>\n \u5728Slackware\u4e2d\uff0c\u5982\u679c\u5f00\u673a\u624b\u52a8\u8fd0\u884c\uff1b<\/p>\n \u67e5\u770b\/etc\/rc.d\/rc.M\u6587\u4ef6\u662f\u5426\u6709\u5982\u7684\u884c\uff0c\u5982\u679c\u6ca1\u6709\u5c31\u52a0\u4e0a\uff0c\u5927\u591a\u662f\u6709\u7684\uff1b<\/p>\n # Start crond (Dillon's crond):<\/p>\n if [ -x \/usr\/sbin\/crond ]; then<\/p>\n \/usr\/sbin\/crond -l10 >>\/var\/log\/cron 2>&1<\/p>\n \u5982\u679c\u60f3\u8ba9\u7acb\u523b\u8ba9cron\u91cd\u542f\u751f\u6548\uff0c\u4e5f\u53ef\u4ee5\u7528\u4e0b\u8fb9\u7684\u529e\u6cd5\uff1b<\/p>\n [root@localhost ~]# pgrep crond \u6ce8\uff1a\u67e5\u770bcrond\u670d\u52a1\u5668\u662f\u5426\u8fd0\u884c\uff1b<\/p>\n 2022<\/p>\n [root@localhost ~]# pkill crond \u6ce8\uff1a\u6740\u6b7bcrond\uff1b<\/p>\n [root@localhost ~]# pgrep crond \u6ce8\uff1a\u67e5\u770bcrond\u662f\u5426\u9000\u51fa\uff1b<\/p>\n [root@localhost ~]# \/usr\/sbin\/crond \u6ce8\uff1a\u542f\u52a8crond\uff1b<\/p>\n [root@localhost ~]# pgrep crond \u6ce8\uff1a\u67e5\u770bcrond \u662f\u5426\u65e9\u5df2\u8fd0\u884c\u5f97\u4e0a\u53bb\u4e86\uff1b<\/p>\n 3883<\/p>\n 2.2.3 \u5173\u4e8e\u540c\u4e00\u65f6\u95f4\uff0c\u540c\u65f6\u6267\u884c\u591a\u4e2a\u4efb\u52a1\u7684\u5b9a\u4e49\u65b9\u5f0f\uff1b<\/p>\n \u6211\u4eec\u5728\u540e\u9762\u65e9\u5df2\u8bf4\u8fc7\uff0c\u5728\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6709\u7c7b\u4f3c\u5982\u4e0b\u7684\u6bb5\u843d\uff1b<\/p>\n 1 * * * * root run-parts \/etc\/cron.hourly \u6ce8\uff1a\u8868\u793a\u6bcf\u4e2a\u5c0f\u65f6\u7684\u7b2c\u4e00\u5206\u949f\uff0c\u5f00\u59cb\u6267\u884c\/etc\/hourly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 2 4 * * * root run-parts \/etc\/cron.daily \u6ce8\uff1a\u8868\u793a\u6bcf\u665a\u76844\u70b92\u5206\uff0c\u5f00\u59cb\u6267\u884c\/etc\/cron.daily\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 22 4 * * 7 root run-parts \/etc\/cron.weekly \u6ce8\uff1a\u6bcf\u5e74\u7b2c7\u4e2a\u54684\u70b9\u621122\u5206\uff0c\u5f00\u59cb\u6267\u884c \/etc\/cron.weekly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n 42 4 1 * * root run-parts \/etc\/cron.monthly \u6ce8\uff1a\u6bcf\u6708\u7b2c1\u5929\u76844\u70b942\u5206\uff0c\u5f00\u59cb\u6267\u884c\/etc\/cron.monthly\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u7a0b\u5e8f\u6216\u811a\u672c\uff1b<\/p>\n \u4e3e\u4f8b\u6765\u8bf4\uff0c\u6211\u60f3\u5728\u6bcf\u665a5\u70b910\u5206\u6765\u91cd\u65b0\u542f\u52a8httpd \u670d\u52a1\u5668\uff0c\u4e0e\u6b64\u540c\u65f6\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u540c\u65f6\u4e0b\u8f7d\u4e00\u4e2aISO\u6587\u4ef6\u3002\u5982\u679c\u6211\u4eec\u6309\u4e66\u5199\u8ba1\u5212\u4efb\u52a1\u7684\u89c4\u5219\u4e00\u6761\u4e00\u6761\u7684\u6765\u4e66\u5199\uff0c\u5e76\u6dfb\u52a0\u5230\u5168\u5c40\u662f\u6709\u70b9\u9ebb\u70e6\u3002\u4e0d\u5982\u5199\u4e00\u4e2a\u811a\u672c\u7f6e\u4e8e \/etc\/crond.daily\u76ee\u5f55\u4e2d\u3002\u7136\u540e\u628a\u5176\u6743\u9650\u8bbe\u7f6e\u4e3a755 \uff08\u5173\u4e8e\u6743\u9650\u7684\u8bbe\u7f6e\uff0c\u8bf7\u53c2\u8003\uff1a\u300aLinux \u6587\u4ef6\u548c\u76ee\u5f55\u7684\u5c5e\u6027\u300b\uff09\u3002<\/p>\n \u5f53\u7136\u6211\u4eec\u5f97\u6539\u4e00\u6539\u91cc\u9762\u7684 \u5e26\u6709\/etc\/cron.daily\u90a3\u884c\uff0c\u6539\u4e3a\u5982\u4e0b\uff1b<\/p>\n 10 5 * * * root run-parts \/etc\/cron.daily<\/p>\n \u7136\u540e\u6211\u4eec\u5230\/etc\/crond.daily\u76ee\u5f55\u4e2d\u521b\u5efa\u4e24\u4e2a\u6587\u4ef6\uff0c\u4e00\u4e2a\u662f\u62ff\u6765\u91cd\u542fhttpd\u670d\u52a1\u5668\u7684\uff0c\u5982\u4e0b\uff1b<\/p>\n [root@localhost cron.daily]# touch httpd.sh<\/p>\n [root@localhost cron.daily]# chmod 755 httpd.sh<\/p>\n [root@localhost cron.daily]# echo \"\/etc\/init.d\/httpd restart\" > httpd.sh<\/p>\n [root@localhost cron.daily]# more httpd.sh<\/p>\n \/etc\/init.d\/httpd restart<\/p>\n \u5982\u679c\u6211\u60f3\u5728\u6bcf\u665a5\u70b920\u5206\u4e0b\u8f7dFC5\u7684\u955c\u50cf\uff0c\u53ef\u4ee5\u518d\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6fc5down.sh<\/p>\n [root@localhost cron.daily]# touch fc5down.sh<\/p>\n [root@localhost cron.daily]# chmod 755 fc5down.sh<\/p>\n [root@localhost cron.daily]# echo \"\/usr\/bin\/wget \" > fc5down.sh<\/p>\n [root@localhost cron.daily]# more fc5down.sh<\/p>\n \/usr\/bin\/wget<\/p>\n \u7136\u540e\u6211\u4eec\u91cd\u65b0\u542f\u52a8\u4e00\u4e0bcrond\u5c31\u884c\u4e86\uff1b<\/p>\n [root@localhost cron.daily]# pkill crond<\/p>\n [root@localhost cron.daily]# prep crond<\/p>\n [root@localhost cron.daily]# crond&<\/p>\n <\/p>\n \u6ce8\u610f\uff1a\u6211\u53ea\u662f\u60f3\u8bf4\u660e\u4e00\u4e0b\uff0c\u5728\u540c\u4e00\u65f6\u95f4\u6267\u884c\u591a\u4e2a\u8ba1\u5212\u4efb\u52a1\u7684\u7b80\u5355\u7528\u6cd5\uff0c\u5e76\u4e0d\u662f\u6709\u610f\u6559\u7ed9\u60a8\u6bcf\u665a\u665a\u4e0a\u90fd\u4e0b\u8f7dFC5\u7684\u6620\u50cf\u3002\u6211\u4e3e\u8fd9\u4e2a\u4e8b\u4f8b\u662f\u4e3a\u4e86\u521d\u5b66\u8005\u4e86\u89e3\u8fd9\u4e2a\u529f\u80fd\u3002\u5982\u679c\u60a8\u6709\u5f88\u591a\u7684\u4efb\u52a1\u5728\u67d0\u4e00\u65f6\u523b\u6267\u884c\uff0c\u90a3\u5c31\u81ea\u5df1\u5199\u811a\u672c\u6587\u4ef6\u3002\u653e\u5728\/etc\u76ee\u5f55\u4e0b\u7684cron.hourly \u3001cron.daily \u3001cron.weekly \u3001cron.monthly \u76ee\u5f55\u4e2d\u3002\u51e1\u662f\u653e\u8fdb\u8fd9\u79cd\u76ee\u5f55\u7684\u53ef\u6267\u884c\u811a\u672c\uff0c\u90fd\u80fd\u5728\u7ea6\u5b9a\u7684\u65f6\u95f4\u5185\u786e\u5207\u6267\u884c\u3002\u6bcf\u4e2a\u76ee\u5f55\u6709\u6bcf\u4f4d\u76ee\u5f55\u7684\u7528\u9014\uff1b<\/p>\n 2.2.4 \u5bf9\u4e8e\u7528\u6237\u81ea\u8eab\u7684cron \u914d\u7f6e\u6587\u4ef6\u7684\u8bf4\u660e\uff1b<\/p>\n \u6bcf\u4e2a\u7528\u6237\u90fd\u6709\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6linux \u8ba1\u5212\u4efb\u52a1\u6ca1\u6267\u884c<\/strong>\uff0c\u901a\u8fc7crontab -e \u5c31\u53ef\u4ee5\u7f16\u8f91\uff0c\u4e00\u822c\u7684\u60c5\u51b5\u4e0b\uff0c\u5728Fedora\u548cRedhat\u7684\u53d1\u884c\u7248\uff0c\u6211\u4eec\u7f16\u8f91\u597d\u7528\u6237\u7684cron\u914d\u7f6e\u6587\u4ef6\u4fdd\u5b58\u9000\u51fa\u540e\uff0c\u7cfb\u7edf\u4f1a\u624b\u52a8\u5c31\u50a8\u5b58\u4e8e \/var\/spool\/cron\/\u76ee\u5f55\u4e2d\uff0c\u6587\u4ef6\u4ee5\u7528\u6237\u540d\u547d\u540d\u3002\u5728Slackware\u4e2d\u662f\u5750\u843d\/var\/spool\/cron\/crontabs\/\u76ee\u5f55\u4e2d\u3002\u5176\u5b83\u7684\u53d1\u884c\u7248\u90fd\u5dee\u4e0d\u591a\uff0c\u6709\u70b9\u7c7b\u4f3c\u3002\u81ea\u5df1\u627e\u627e\u5427\uff1b\u67e5\u770b\u7528\u6237\u7684\u8ba1\u5212\u4efb\u52a1\u662fcrontab -l<\/p>\n crontab -e \u6ce8\uff1a\u7f16\u8f91\u7528\u6237\u7684cron\u914d\u7f6e\u6587\u4ef6\uff1b<\/p>\n crontab -l \u6ce8\uff1a\u67e5\u770b\u7528\u6237\u7684\u8ba1\u5212\u4efb\u52a1\uff1b<\/p>\n \u6bd4\u5982\u6211\u7528beinan\u7528\u6237\u6765\u8fd0\u884ccrontab -e \uff1b<\/p>\n [beinan@localhost ~]$ id \u6ce8\uff1a\u5224\u65ad\u6240\u7528\u7528\u6237\u8eab\u5206\uff1b<\/p>\n uid=500(beinan) gid=500(beinan) groups=500(beinan)<\/p>\n [beinan@localhost ~]$ crontab -e \u6ce8\uff1a\u7f16\u8f91\u7528\u6237beinan\u7684\u8ba1\u5212\u4efb\u52a1\uff1b<\/p>\n \u6211\u4eec\u5728\u4e0a\u9762\u5b9a\u4e49\u4e00\u4e2a\u4efb\u52a1\uff1b<\/p>\n 40 20 * * * \/usr\/bin\/wget<\/p>\n \u4fdd\u5b58\u9000\u51fa\u540e\uff0c\u6211\u4eec\u7528\u4e0b\u8fb9\u7684\u547d\u4ee4\u6765\u67e5\u770bbeinan\u7528\u6237\u7684\u8ba1\u5212\u4efb\u52a1\uff1b<\/p>\n [beinan@localhost ~]$ crontab -l<\/p>\n 40 20 * * * \/usr\/bin\/wget<\/p>\n \u914d\u7f6e\u597d\u540e\uff0c\u6211\u4eec\u8fd8\u8981\u91cd\u65b0\u542f\u52a8crond\u670d\u52a1\u5668linux\u64cd\u4f5c\u7cfb\u7edf\u6559\u7a0b\uff0c\u6bcf\u4e2a\u7528\u6237cron\u914d\u7f6e\u6587\u4ef6\u7684\u6539\u52a8\u90fd\u5f97\u91cd\u65b0\u542f\u52a8crond\u670d\u52a1\u5668\uff1b\u524d\u9762\u65e9\u5df2\u8bf4\u8fc7\u4e86\uff0c\u8fd9\u91cc\u7701\u7565\uff1b\u503c\u5f97\u6ce8\u610f\u7684\u662f\u91cd\u542fcrond\u670d\u52a1\u5668\uff0c\u9700\u8981root\u6743\u9650\uff0c\u60a8\u53ef\u4ee5\u7528su\u547d\u4ee4\u5207\u6362\u5230root \u7528\u6237\uff0c\u7136\u540e\u518d\u6765\u91cd\u542fcrond\uff1b<\/p>\n \u5728Fedora\u6216Redhat\u7b49\u4ee5RPM\u5305\u7ba1\u7406\u7684\u53d1\u884c\u7248\u4e2d\uff1b<\/p>\n [beinan@localhost ~]$ su<\/p>\n \u53e3\u4ee4\uff1a<\/p>\n [root@localhost beinan]# \/etc\/init.d\/crond restart<\/p>\n \u505c\u6b62 crond\uff1a [\u786e\u5b9a]<\/p>\n \u542f\u52a8 crond\uff1a [\u786e\u5b9a]<\/p>\n \u4e5f\u53ef\u4ee5\u5148\u6740\u5bb3crond\uff0c\u518d\u8fd0\u884ccrond\u547d\u4ee4\u7684\u529e\u6cd5\u6765\u542f\u52a8\uff1b<\/p>\n [root@localhost beinan]# pkill crond<\/p>\n [root@localhost beinan]# pgrep crond<\/p>\n [root@localhost beinan]# \/usr\/sbin\/crond<\/p>\n [root@localhost beinan]# pgrep crond<\/p>\n 6664<\/p>\n 3\u3001\u8ba1\u5212\u4efb\u52a1\u7684\u5e94\u7528\u8303\u56f4\uff1b<\/p>\n \u8ba1\u5212\u4efb\u52a1\u4e3b\u8981\u662f\u8ba9\u7cfb\u7edf\u624b\u52a8\u5b8c\u6210\u4e00\u4e9b\u5de5\u4f5c\u3002\u6bd4\u5982\u6211\u4eec\u53ef\u4ee5\u8ba9\u7cfb\u7edf\u624b\u52a8\u5728\u67d0\u4e00\u65f6\u523b\u6e05\u9664\u6216\u5907\u4efdhttpd\u670d\u52a1\u5668\u7684\u65e5\u5fd7\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8httpd\u670d\u52a1\u5668\uff0c\u8fd9\u5bf9\u7f51\u7edc\u7ba1\u7406\u5458\u6765\u8bf4\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e5f\u53ef\u4ee5\u8ba9\u7cfb\u7edf\u624b\u52a8\u6e05\u7a7a\u5750\u843d\/tmp\u76ee\u5f55\u7684\u5783\u573e\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u8ba1\u5212\u4efb\u52a1\uff0c\u662f\u4efb\u52a1\u5728\u7ea6\u5b9a\u7684\u65f6\u95f4\u6267\u884c\u5df2\u7ecf\u8ba1\u5212\u597d\u7684\u5de5\u4f5c\uff0c\u8fd9\u662f\u8868\u9762\u7684\u610f\u601d\u3002\u670d\u52a1\u5668\u91cd\u65b0\u542f\u52a8\uff0c\u8fd9\u5c31\u662f\u4e00\u4e2a\u8ba1\u5212\u4efb\u52a1\uff1b\u6211\u4eec\u53ef\u4ee5\u628a\u6bcf\u59298\u70b930\u5206\u91cd\u65b0\u542f\u52a8\u7684\u8ba1\u5212\u4efb\u52a1\u5199\u5165cron\u5168\u5c40\u6027\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u5728root\u7528\u6237\u81ea\u5df1\u7684cron\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\u5173\u4e8e\u540c\u4e00\u65f6\u95f4\uff0c\u540c\u65f6\u6267\u884c\u591a\u4e2a\u4efb\u52a1\u7684\u5b9a\u4e49\u65b9\u6cd5\uff1b\u5982\u679c\u60a8\u6709\u597d\u591a\u7684\u4efb\u52a1\u5728\u67d0\u4e00\u65f6\u523b\u6267\u884c\uff0c\u90a3\u5c31\u81ea\u5df1\u5199\u811a\u672c\u6587\u4ef6\u3002\u8ba1\u5212\u4efb\u52a1\u4e3b\u8981\u662f\u8ba9\u7cfb\u7edf\u81ea\u52a8\u5b8c\u6210\u4e00\u4e9b\u5de5\u4f5c\u3002<\/p>\n","protected":false},"author":1,"featured_media":282788,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-282787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/282787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=282787"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/282787\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/282788"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=282787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=282787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=282787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}