centos
에 crontab -e
명령을 사용하여 cron 스케줄러를 설정하는 데 익숙합니다. 하지만 오늘 내 centos
서버 중 하나에이 명령이 없다는 것을 알았습니다.CentOS에서 crontab을 설치하는 방법
yum install crontab
을 사용하여 설치하려고했지만 행운이 없었습니다. 그럼 난 yum install crontabs
을 시도하고
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
crontabs noarch 1.10-11.el5 base 7.0 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 7.0 k
Is this ok [y/N]:
그러나 여전히 crontab
명령이 작동하지 않는 것을
cat /etc/crontab
을 할 경우는
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
40 * * * * root run-parts /etc/cron.hourly
54 1 * * * root run-parts /etc/cron.daily
14 3 * * 0 root run-parts /etc/cron.weekly
38 1 16 * * root run-parts /etc/cron.monthly
이 내가 특정 서버에 crontab
을 가지고해야 할 일이 아래에 보여? CentOS release 5.2 (Final)
을 사용하고 있습니다. 크론 쇼에
그렙 :
[root~]# ps -ef | grep cron
root 24022 24001 0 19:07 pts/1 00:00:00 grep cron
시작 크론 서비스 리턴 : Install crontab on CentOS에서 보는 바와 같이
[root~]# service cron start
cron: unrecognized service
감사 : 두 경우 모두
및
이 같은 출력을 얻을 cryie는 7.x에서 중요한 부분입니다 – jeffmcneill
6.x에서는'yum install crontabs'도 참고합니다. cronie, cronie-anacron 및 exim을 설치하십시오. 서비스가'crond'이고 서비스가 시작되어야 함을 기억하십시오 (그리고'chkconfig enable on '). – jeffmcneill