2017-05-15 7 views
-4

배치 (at) 명령을 사용하여 스크립트를 작성하여 뉴스 레터를 발송했습니다.리눅스에서 일괄 처리 작업을 예약하는 방법

batch 
at> ///myscript to run send out the newsletter 

이제 특정 날짜에 해당 스크립트를 cron하고 싶습니다.

+2

Google "linux cron tutorial". 지옥, 심지어 위키 피 디아 페이지가 어떻게 완료되는지 설명합니다 ... – fancyPants

+0

이것은 어리석은 질문 인 것처럼 보이지만 배치 명령을 사용하여 만든 배치 파일의 경로를 어디에서 얻을 수 있습니까? – Chetan

답변

0

"crontab"명령을 사용할 수 있습니다. 검색 만하면 다양한 결과를 얻을 수 있습니다. http://www.linuxandubuntu.com/home/linux-utility-understand-linux-crontab-or-cron-expressions-to-run-command-at-specific-interval

Usage: 
crontab [options] file 
crontab [options] 
crontab -n [hostname] 

Options: 
-u <user> define user 
-e   edit user's crontab 
-l   list user's crontab 
-r   delete user's crontab 
-i   prompt before deleting 
-n <host> set host in cluster to run users' crontabs 
-c   get host in cluster to run users' crontabs 
-s   selinux context 
-x <mask> enable debugging 

예 : 런타임 사용자에서

CORN_EXPRESSION 당신이 생성 할 수있는 곳 파일

CRON_EXPRESSION /path/to/my/batch/file 

contab -e 

를 편집 (스크립트를 실행할 사용자) 와 http://crontab-generator.org/

+0

이것은 바보 같은 질문 인 것처럼 보이지만 배치 파일 경로 배치 명령 사용 – Chetan

+0

@ Chetan : 리눅스에서 얼마나 경험이 있습니까? 당신은 이미 당신이 그 대본을 가지고 있다고 말했습니다. 따라서 경로는 스크립트의 절대 경로입니다. – gusto2

관련 문제