IT정리노트

블로그 이미지

Edward. K

메멘토적 기억능력을 소유한 개발자 노트.

CronExpression [Quartz Cron]

Programming/JAVA 2007. 10. 16. 11:21
반응형

http://www.quartzscheduler.org/quartz/tutorial.html#cronTriggers

http://www.zilverline.org/zilverlineweb/space/scheduling

Cron Expressions

cronExpression 예제
  1 Seconds (0–59)
  2 Minutes (0–59)
  3 Hours (0–23)
  4 Day of month (1–31)
  5 Month (1–12 or JAN–DEC)
  6 Day of week (1–7 or SUN–SAT)
  7 Year (1970–2099)
  * all
  ? 설정않함.


0 0 10 * * ?
   매일 오전 10시에 실행

0 0 10 1 * ?
   매월 1일 오전 10시에 실행

0 0 10 ? ? 1 ?
  매주 일요일 오전 10시에 실행


Cron-Expressionsare used to configure instances ofCronTrigger. Cron-Expressions are strings that are actually made up of six sub-expressions, that describe individual details of the schedule. These sub-expression are separated with white-space, and represent:

  • Seconds
  • Minutes
  • Hours
  • Day-of-Month
  • Month
  • Day-of-Week

CronTrigger Example 1 - an expression to create a trigger that simply fires every 5 minutes

"0 0/5 * * * ?"

CronTrigger Example 2 - an expression to create a trigger that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.).

"10 0/5 * * * ?"

CronTrigger Example 3 - an expression to create a trigger that fires at 10:30, 11:30, 12:30, and 13:30, on every Wednesday and Friday.

"0 30 10-13 ? * WED,FRI"

CronTrigger Example 4 - an expression to create a trigger that fires every half hour between the hours of 8 am and 10 am on the 5th and 20th of every month. Note that the trigger will NOT fire at 10:00 am, just at 8:00, 8:30, 9:00 and 9:30

"0 0/30 8-9 5,20 * ?"

Note that some scheduling requirements are too complicated to express with a single trigger - such as "every 5 minutes between 9:00 am and 10:00 am, and every 20 minutes between 1:00 pm and 10:00 pm". The solution in this scenario is to simply create two triggers, and register both of them to run the same job.

반응형
Posted by Edward. K
블로그 이미지

메멘토적 기억능력을 소유한 개발자 노트.

by Edward. K

공지사항

    최근...

  • 포스트
  • 댓글
  • 트랙백
  • 더 보기

태그

  • EkNote
  • 플래시 게임
  • sqlgate
  • eclipse plugin
  • 전자정부프레임워크
  • egov
  • 이클립스
  • 개한민국
  • 캡쳐툴
  • rocketdock
  • tomcat
  • 미네르바
  • Jboss
  • 사업 이야기
  • ERwin
  • 색상코드표
  • 컴퓨터 관리
  • EditPlus
  • 가상화폐무료
  • Flash Player
  • Eclipse
  • flex
  • android
  • STS
  • Graphic
  • iBATIS
  • 이미지 편집
  • 중독성게임
  • toad
  • netbeans

글 보관함

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

링크

카테고리

분류 전체보기 (792)
행운이와함께 (1)
EkNote Project (18)
ARIS (0)
Android (2)
LINK (39)
UML (9)
Programming (154)
Cobol (0)
ASP (0)
CSS (5)
C_C++ (2)
IBatis (2)
JSP (3)
JAVA (76)
JavaScript (44)
PHP (2)
Utility (76)
Protable (3)
MobileProgram (4)
SKT (0)
KTF (0)
LGT (0)
자료들 (4)
DB (82)
mongoDB (0)
MySQL (8)
Oracle (61)
MSSQL (4)
Graphic (8)
Flash (3)
PhotoShop (3)
SourceFactory (4)
Collection (73)
작가의기막힌상상력 (14)
미소를찾아보는공간 (44)
내심장은작동중일까 (6)
멀더와스컬리의노트 (3)
이건어디에사용할까 (6)
Edward (275)
나만 알기엔 아까워 (100)
기억하기 위한 기록 (123)
시선이 머무는 공간 (50)
숨기고 싶은 이야기 (2)

카운터

Total
Today
Yesterday
방명록 : 관리자 : 글쓰기
Edward. K's Blog is powered by daumkakao
Skin info material T Mark3 by 뭐하라
favicon

IT정리노트

메멘토적 기억능력을 소유한 개발자 노트.

  • 태그
  • 링크 추가
  • 방명록

관리자 메뉴

  • 관리자 모드
  • 글쓰기
  • 분류 전체보기 (792)
    • 행운이와함께 (1)
    • EkNote Project (18)
    • ARIS (0)
    • Android (2)
    • LINK (39)
    • UML (9)
    • Programming (154)
      • Cobol (0)
      • ASP (0)
      • CSS (5)
      • C_C++ (2)
      • IBatis (2)
      • JSP (3)
      • JAVA (76)
      • JavaScript (44)
      • PHP (2)
    • Utility (76)
      • Protable (3)
    • MobileProgram (4)
      • SKT (0)
      • KTF (0)
      • LGT (0)
      • 자료들 (4)
    • DB (82)
      • mongoDB (0)
      • MySQL (8)
      • Oracle (61)
      • MSSQL (4)
    • Graphic (8)
      • Flash (3)
      • PhotoShop (3)
    • SourceFactory (4)
    • Collection (73)
      • 작가의기막힌상상력 (14)
      • 미소를찾아보는공간 (44)
      • 내심장은작동중일까 (6)
      • 멀더와스컬리의노트 (3)
      • 이건어디에사용할까 (6)
    • Edward (275)
      • 나만 알기엔 아까워 (100)
      • 기억하기 위한 기록 (123)
      • 시선이 머무는 공간 (50)
      • 숨기고 싶은 이야기 (2)

카테고리

PC화면 보기 티스토리 Daum

티스토리툴바