crontab 스케쥴 설정값

Posted on 2021. 8. 29. 16:11
Filed Under LINUX+UNIX

초(0~59) ┃분(0~59) ┃시(0~23) ┃일(1~31) ┃월(1~12) ┃요일(0~6,0=일요일)

0 0 1 * * ?
:매일 새벽1시

0 0 18 14,24 * *
:매달 14,24일 18시에 실행

0 0 18 14-24 * *
:매달 14일 부터~24일 까지 18시에 실행

0 5,11 * * * 
: 새벽 5시와 밤 11시.

5 * * * * 
: 매시 5분이 될 때마다 실행. 즉, 한 시간 간격으로 실행.

0 5 * 1 * ?
: 매달 1일 새벽 5시에 실행.

#물음표(?): 일/요일에만 사용 가능. 특정값 없음. *과 동일.

 

Linux 서버 시간대 확인하기

// 간단히
[centos@ip-xx-xxx-xxx-xxx:/var/xxx] date
Fri Aug 25 00:56:31 UTC 2023

// 상세히 예시1) UTC    (한국은 UTC+9)
[centos@ip-xx-xxx-xxx-xxx:/var/xxx] timedatectl
      Local time: Fri 2023-08-25 00:57:27 UTC
  Universal time: Fri 2023-08-25 00:57:27 UTC
        RTC time: Fri 2023-08-25 00:55:16
       Time zone: UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

// 상세히 예시2) CST/CEST
[centos@ip-xx-xxx-xxx-xxx:/var/xxx] timedatectl
      Local time: Tue 2023-08-29 09:47:31 CEST
  Universal time: Tue 2023-08-29 07:47:31 UTC
        RTC time: Tue 2023-08-29 07:46:49
       Time zone: Europe/Berlin (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2023-03-26 01:59:59 CET
                  Sun 2023-03-26 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2023-10-29 02:59:59 CEST
                  Sun 2023-10-29 02:00:00 CET

 

참조

https://www.timeanddate.com/worldclock/converter.html (한국은 UTC+8, 유럽은 CET)

 

https://m.blog.naver.com/banffer/220678816019 (2016)

 

https://yangyag.tistory.com/358 [Hello Brother!]

https://iamfreeman.tistory.com/entry/crontab-사용법-알아보기-크론탭-옵션-스케쥴러

 

 

 
 
반응형

About

by 쑤기c

반응형