linux crontab run on the last day of the month
2021. 4. 7. 13:46ㆍ기타
728x90
If you still really want to run it on the last day of the month, one option is to simply detect if tomorrow is the first (either as part of your script, or in the crontab itself).
So, something like:
55 23 28-31 * * [[ "$(date --date=tomorrow +\%d)" == "01" ]] && myjob.sh
should be a good start, assuming you have a relatively intelligent date program.
stackoverflow.com/questions/6139189/cron-job-to-run-on-the-last-day-of-the-month
728x90
반응형
'기타' 카테고리의 다른 글
OS에 대한 이야기... CUDA란 무엇인가.. VM.. 버추얼박스.. (0) | 2020.03.27 |
---|---|
자주쓰는 Git 명령어 (0) | 2020.03.22 |
MySQLWorkbench 실행안됨 그래서 DBeaver 설치 (0) | 2020.02.05 |
Regular expression operators (0) | 2020.01.22 |
정규표현식 예약어 (1) | 2020.01.15 |