crontab实现以秒执行
2014-05-07 23:22
267 查看
linux中crontab实现以秒执行任务
很多时候,我们计划任务需要精确到秒来执行,根据以下方法,可以很容易地以秒执行任务。以下方法将每10秒执行一次1.编辑crontabcrontab -e* * * * * /bin/date >>/tmp/date.txt* * * * * sleep 10; /bin/date >>/tmp/date.txt* * * * * sleep 20; /bin/date >>/tmp/date.txt* * * * * sleep 30; /bin/date >>/tmp/date.txt* * * * * sleep 40; /bin/date >>/tmp/date.txt* * * * * sleep 50; /bin/date >>/tmp/date.txt2.检查结果tail -f /tmp/date.txt
很多时候,我们计划任务需要精确到秒来执行,根据以下方法,可以很容易地以秒执行任务。以下方法将每10秒执行一次1.编辑crontabcrontab -e* * * * * /bin/date >>/tmp/date.txt* * * * * sleep 10; /bin/date >>/tmp/date.txt* * * * * sleep 20; /bin/date >>/tmp/date.txt* * * * * sleep 30; /bin/date >>/tmp/date.txt* * * * * sleep 40; /bin/date >>/tmp/date.txt* * * * * sleep 50; /bin/date >>/tmp/date.txt2.检查结果tail -f /tmp/date.txt
相关文章推荐
- 解析Ubuntu下crontab命令的用法
- linux crontab实例分析
- 关于crontab的使用详解
- Web服务器日志统计分析完全解决方案
- MySQL定时备份之使用Linux下的crontab定时备份实例
- 解析crontab php自动运行的方法
- CentOS安装crontab及使用方法
- Linux 定时执行命令 crontab
- crontab基础学习
- linux 自动执行 crontab学习笔记
- 例行命令
- linux crontab command
- Linux中后台执行任务及通配符
- Crontab 命令需要注意的地方
- linux crontab 详解
- crontab 用法
- Crontab的用法
- [Extmail] 请问那些自动生成的计划任务分别是什么意思?
- Linux操作系统定时任务系统 Cron 入门
- 在crontab中利用scp命令自动备份文件