Search
Duplicate

crontab 메일 발송 제한

OS 내 메일 스풀(큐) 확인

ls -trl /var/spool/postfix/maildrop | wc -l
Bash
복사

/etc/crontab

SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" 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
Bash
복사

crontab에서 표준 에러 null 처리

# crontab -e */1 * * * * /pjw/test/crontabtest/error.sh > /dev/null 2>&1
Bash
복사

crontab 재시작

ps -ef | grep cron service crond restart or systemctl status crond.serivce systemctl restart crond.serivce
Bash
복사