ubuntu crontab 정시 작업 생 성

1495 단어 crontab
1.         
  hadoop@hadoopSlave2:/opt/shell$ crontab -e 
    :47 12 * * * /opt/shell/showDate.sh >> /opt/shell/hello.log
2.  cron  
  hadoop@hadoopSlave2:/opt/shell$ service cron restart/stop/start
  stop: Rejected send message, 1 matched rules; type="method_call",
  sender=":1.83" (uid=1000 pid=32646 comm="stop cron ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.84" (uid=1000 pid=32643 comm="start cron ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
3.  crontab      
  hadoop@hadoopSlave2:/opt/shell$ service cron status
  cron start/running, process 989

4.           
  hadoop@hadoopSlave2:/opt/shell$ crontab -l
  47 12 * * * /opt/shell/showDate.sh >> /opt/shell/hello.log
5.hadoop@hadoopSlave2:/opt/shell$ vim showDate.sh 
  #!/bin/bash
  date +%A
6.    
  hadoop@hadoopSlave2:/opt/shell$ crontab -r
  hadoop@hadoopSlave2:/opt/shell$ crontab -l
  no crontab for hadoop

좋은 웹페이지 즐겨찾기