LINUXUSER 指令專區
回首頁 | 回指令列表

指令名稱

crontab

使用權限 由/etc/cront.allow 及/etc/cron.deny決定使用權限,若兩個檔案均不存在則由site-dependent configuration 參數決定只有root有權限或所有的使用者均有權限 
使用方式 crontab [ -u user] file
crontab [ -u user] { -l | -r | -e }
說  明 用來排程個人儲存於/var/spool/cron目錄下cron事件

參  數

-u 特定的使用者
-l  顯示目前所有的工作
-r 刪除工作
-e  建立或編輯工作排程
範  例 1 .每天下午八時執行一個搜尋core的工作,並在結束後將結果寄給你,  先準備一個外部檔案/tmp/experiment
  0,20 * * * find / -name "core* {} \; 
  然後
  crontab /tmp/experiment
  crontab -l
  0,20 * * * find /-name "core*" {} \; root@anne/