본문 바로가기
OS/Linux

crontab / crond

by 하하IT 2020. 4. 17.

1. OS version

[root@instance-1 ~]# cat /etc/*release*

CentOS Linux release 7.9.2009

 

1. crond 프로세스 확인

[root@instance-1 ~]# service crond status

Redirecting to /bin/systemctl status crond.service

crond.service - Command Scheduler Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled) Active: active (running)

...

[root@instance-1 ~]#

 

 

2. crond 시작/정지/재시작 

[root@instance-1 ~]# service crond stop

Redirecting to /bin/systemctl stop crond.service

[root@instance-1 ~]#

[root@instance-1 ~]#

[root@instance-1 ~]# service crond start

Redirecting to /bin/systemctl start crond.service

[root@instance-1 ~]#

[root@instance-1 ~]# service crond restart

Redirecting to /bin/systemctl restart crond.service

[root@instance-1 ~]#

[root@instance-1 ~]#

 

 

3. crontab 사용

 

 작업리스트 조회

[root@WWW ]# crontab -l

 

 작업리스트 수정

[root@WWW ]# crontab -e

 

 작업리스트 삭제

[root@WWW ]# crontab -r

 

4. crontab  세부내용

[root@instance-1 ~]# crontab -l

#attendDaily

1 6 * * *    TZ=Asia/Seoul   /opt/CRONJOB/attendDaily/BATCH1.sh

0 6 * * *   TZ=KST               /opt/CRONJOB/attendDaily/BATCH2.sh

[root@instance-1 ~]#

 

'OS > Linux' 카테고리의 다른 글

centos / openjdk  (0) 2020.04.19
linux / centos7 / hostname  (0) 2020.04.19
yum / update / 자동 업데이트  (0) 2020.04.17
ssh / port 수정  (0) 2020.04.17
Centos 7 / network config CLI  (0) 2020.04.16