[Cron] 크론 표현식 (cron expression) with Jenkins Batch Scheduler

Yuri Lee·2022년 7월 21일
0

Intro

주기적으로 생성되어야 할 API를 배치로 등록해야 했다. Jenkins Batch Scheduler 를 활용하여 진행하기로 했다.

Cron expression?

크론(Cron)을 구동할 때 스케쥴링의 파라미터로 사용되는 식을 크론 표현식(Cron Expressions)라고 한다. 유닉스/리눅스 기반의 스케쥴러에도 사용되지만 Quatz 스케줄러 에서도 사용된다. 크론 표현식은 필드와 특수문자를 조합하여 스케쥴링을 조절할 수 있다.

Cron Syntax

0 23 * * *
// Staged as
{Minute} {Hour} {DayOfMonth} {Month} {DayofWeek}
  • MINUTE : Minutes within the hour (0–59)
  • HOUR : The hour of the day (0–23)
  • DOM : The day of the month (1–31)
  • MONTH : The month (1–12)
  • DOW : The day of the week (0–7) where 0 and 7 are Sunday.

Example

Every Saturday and Sunday at 5 PM

0 17 * * 6,7

매주 토요일(6)과 일요일(7) 오후 5시(17)에 진행된다.


https://zamezzz.tistory.com/197
https://visualguide.org/ko/cron%EC%9C%BC%EB%A1%9C-jenkins-%EC%9E%91%EC%97%85-%EC%98%88%EC%95%BD

profile
Step by step goes a long way ✨

0개의 댓글