일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 함수형 사고
- spray
- clean code
- 데이터플랫폼
- 켄트백
- 클린코드
- 테스트주도개발
- coursera
- kafka
- wait region split
- 단위테스트
- 2016년회고
- 데이터레이크
- 개발자로살아남기
- datalake
- 개발7년차매니저1일차
- 동시성
- functional thinking
- 박종천
- 해커컵
- 2017회고
- 알고스팟
- 데이터야놀자
- Raw-Request-URI
- 회고
- 개발자
- 데이터유통
- hackercup2017
- 코딩인터뷰
- 실전사례
Archives
- Today
- Total
Software Engineering Note
cron job 한번만 실행되도록 하기 본문
간단한 방법이 없나 찾아봤더니 이런게 있었다.
http://serverfault.com/questions/82857/prevent-duplicate-cron-jobs-running/82863#82863
난 처음보는거라...ㅋ
"/usr/bin/flock -n /tmp/my.lockfile /bin/sh test.sh"
이런식으로 실행해보면 test.sh이 실행중인 경우, test.sh은 중복 실행이 안된다.
man page
-n, --nb, --nonblock
Fail (with an exit code of 1) rather than wait if the lock cannot be immediately acquired.
'삽질과 꿀팁사이' 카테고리의 다른 글
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? (0) | 2020.03.11 |
---|---|
특정 포트를 사용하는 프로세스가 없는데 Bind Exception 발생할때 (0) | 2017.04.30 |
python에서 json 처리 (0) | 2015.04.01 |