您的位置:首页 > 运维架构 > Linux

Linux 定时任务 crontab

2017-05-20 17:48 148 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: