콘텐츠로 건너뛰기

Linux

  • Nginx 에 Let’s Encrypt 의 SSL 을 발급받고 적용하는 법
  • Ubuntu 에서 nginx, php, mariadb 까지 세팅방법
  • Ubuntu 의 방화벽 ufw 사용법
  • Cron 사용법

Ubuntu

  • Nginx 에 Let’s Encrypt 의 SSL 을 발급받고 적용하는 법
  • Ubuntu 에서 nginx, php, mariadb 까지 세팅방법
  • Ubuntu 의 방화벽 ufw 사용법
  • nginx 를 사용중인데 워드프레스에서 고유주소를 글 이름으로 설정하면 404 오류가 날 때

Nginx

  • Nginx 에 Let’s Encrypt 의 SSL 을 발급받고 적용하는 법
  • Ubuntu 에서 nginx, php, mariadb 까지 세팅방법
  • nginx 를 사용중인데 워드프레스에서 고유주소를 글 이름으로 설정하면 404 오류가 날 때

Cinema

  • 영상 화면 비율 / 해상도 차트
View Categories
  • Home
  • Docs
  • Linux
  • Cron 사용법

Cron 사용법

< 1 min read

1. cron 서비스 관리
# cron 서비스 상태 확인

systemctl status crond

# cron 서비스 시작

systemctl start crond

# 부팅 시 자동 시작 설정

systemctl enable crond

2. crontab 명령어 기본 사용법
# 현재 사용자의 crontab 편집

crontab -e

# crontab 목록 확인

crontab -l

# crontab 삭제

crontab -r

3. crontab 시간 형식

* * * * * 실행할_명령어
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └─ 요일 (0-7, 0과 7은 일요일)
│ │ │ └─── 월 (1-12)
│ │ └──── 일 (1-31)
│ └────── 시 (0-23)
└──────── 분 (0-59)

4. 사용 예시:
# 매일 오후 2시에 실행

0 14 * * * /home/user/backup.sh

# 매시간 30분마다 실행

30 * * * * /scripts/check.sh

# 평일(월-금) 오전 9시에 실행

0 9 * * 1-5 /home/user/workday.sh

# 5분마다 실행

*/5 * * * * /scripts/monitor.sh

5. 주요 설정 파일 위치:

  • 시스템 전체 cron 작업: /etc/crontab
  • 사용자별 cron 작업: /var/spool/cron/
  • cron 작업 허용/거부 설정: /etc/cron.allow, /etc/cron.deny
  • cron 로그 확인:

6, cron 로그 확인

tail -f /var/log/cron
What are your Feelings
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2025-02-09
Ubuntu 의 방화벽 ufw 사용법

Powered by BetterDocs

답글 남기기 응답 취소

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다