Linux 定时任务 crontab

demo1

crontab -e

# 一分钟执行一次

*/1 * * * * /home/hadoop/hivestudy/test.sh

#!/bin/bash
# tset.sh echo `date`
>> /home/hadoop/hivestudy/test.dat

ll test.dat

观察文件是否在变大

crontab -l 查看定时任务

 

每五分钟执行  */5 * * * *

每小时执行     0 * * * *

每天执行        0 0 * * *

每周执行       0 0 * * 0

每月执行        0 0 1 * *

每年执行       0 0 1 1 *

http://www.cnblogs.com/beyang/p/5993180.html

http://www.jb51.net/LINUXjishu/19905.html

posted @ 2017-05-20 17:48  牵牛花  阅读(170)  评论(0编辑  收藏  举报