웹서버 | CentOS Linux 7 crontab 스케줄러 python 돌리기
페이지 정보
작성자 전소현 작성일20-06-30 14:37 조회2,463회 댓글0건관련링크
본문
vi /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*/30 * * * * root /usr/bin/python /home/play.py >> /home/log/crontab_`date +\%Y-\%m-\%d_\%H\%M`.log 2>&1
30분마다 실행
* */1 * * * 1시간마다 실행
*/5 * * * * 5분마다 실행
---------------------------------------------------------------------------------------
/bin/systemctl stop crond.service
/bin/systemctl restart crond.service
/bin/systemctl start crond.service
* 로고정보
cat /var/log/cron
#crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*/30 * * * * root /usr/bin/python /home/play.py >> /home/log/crontab_`date +\%Y-\%m-\%d_\%H\%M`.log 2>&1
30분마다 실행
* */1 * * * 1시간마다 실행
*/5 * * * * 5분마다 실행
---------------------------------------------------------------------------------------
/bin/systemctl stop crond.service
/bin/systemctl restart crond.service
/bin/systemctl start crond.service
* 로고정보
cat /var/log/cron
#crontab
[주소복사] https://www.goodsweb.kr/?u=D415Z5BY
SNS 알리기
핀터레스트
텔레그램로
블로그로
페이스북
트위터
카카오스토리
카톡 공유
관련 블로그
로딩중