备注:
系统运维 温馨提醒:qihang01原创内容版权所有,转载请注明出处及原文链接
crontab文件的格式:
minute hour day month weekday username command
minute:分,值为0-59
hour:小时,值为1-23
day:天,值为1-31
month:月,值为1-12
weekday:星期,值为0-6(0代表星期天,1代表星期一,以此类推)
username:要执行程序的用户,一般设置为root
command:要执行的程序路径(设置为绝对路径)例如:/home/www.osyunwei.com/osyunwei.sh
附:crontab规则详细实例
1、每天6:00执行
0 6 * * * root /home/www.osyunwei.com/osyunwei.sh
2、每周六凌晨4:00执行
0 4 * * 6 root /home/www.osyunwei.com/osyunwei.sh
3、每周六凌晨4:05执行
5 4 * * 6 root /home/www.osyunwei.com/osyunwei.sh
4、每周六凌晨4:15执行
15 4 * * 6 root /home/www.osyunwei.com/osyunwei.sh
5、每周六凌晨4:25执行
25 4 * * 6 root /home/www.osyunwei.com/osyunwei.sh
6、每周六凌晨4:35执行
35 4 * * 6 root /home/www.osyunwei.com/osyunwei.sh
7、每周六凌晨5:00执行
5 * * 6 root /home/www.osyunwei.com/osyunwei.sh
8、每天8:40执行
40 8 * * * root /home/www.osyunwei.com/osyunwei.sh
9、每天8:30执行
30 8 * * * root /home/www.osyunwei.com/osyunwei.sh
10、每周一到周五的11:41开始,每隔10分钟执行一次
41,51 11 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
1-59/10 12-23 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
11、在每天的10:31开始,每隔2小时重复一次
31 10-23/2 * * * root /home/www.osyunwei.com/osyunwei.sh
12、每天15:00执行
0 15 * * * root /home/www.osyunwei.com/osyunwei.sh
13、每天的10:30开始,每隔2小时重复一次
30 10-23/2 * * * root /home/www.osyunwei.com/osyunwei.sh
14、每天15:30执行
30 15 * * * root /home/www.osyunwei.com/osyunwei.sh
15、每天17:50执行
50 17 * * * root /home/www.osyunwei.com/osyunwei.sh
16、每天8:00执行
0 8 * * * root /home/www.osyunwei.com/osyunwei.sh
17、每天18:00执行
0 18 * * * root /home/www.osyunwei.com/osyunwei.sh
18、每天8:30执行
系统运维 温馨提醒:qihang01原创内容版权所有,转载请注明出处及原文链接
30 8 * * * root /home/www.osyunwei.com/osyunwei.sh
19、每天20:30
30 20 * * * root /home/www.osyunwei.com/osyunwei.sh
20、每周一到周五2:00
0 2 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
21、每周一到周五9:30
30 9 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
22、每周一到周五8:00,每周一到周五9:00
0 8,9 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
23、每天23:59
59 23 * * * root /home/www.osyunwei.com/osyunwei.sh
24、每周六23:59
59 23 * * 6 root /home/www.osyunwei.com/osyunwei.sh
25、每天0:30
30 0 * * * root /home/www.osyunwei.com/osyunwei.sh
26、每周一到周五9:25到11:35之间、13:00到15:00之间,每隔10分钟运行一次
25,35,45,55 9 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
5-59/10 10 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
5,15,25,35 11 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
*/10 13-15 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
27、每周一到周五8:30、8:50、9:30、10:00、10:30、11:00、11:30、13:30、14:00、14:30、5:00分别执行一次
30,50 8 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
30 9 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
*/30 10-11 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
30 13 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
0,30 14-15 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
28、每天23:50执行
50 23 * * * root /home/www.osyunwei.com/osyunwei.sh
29、每天10:00、16:00执行
0 10,16 * * * root /home/www.osyunwei.com/osyunwei.sh
30、每天5:30执行
30 5 * * * root /home/www.osyunwei.com/osyunwei.sh
31、每周一到周五9:30执行
30 9 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
32、每周一到周五13:00执行
0 13 * * 1-5 root /home/www.osyunwei.com/osyunwei.sh
33、每天7:51执行
51 7 * * * root /home/www.osyunwei.com/osyunwei.sh
34、每天7:53、12:40分别执行一次
53 7 * * * root /home/www.osyunwei.com/osyunwei.sh
40 12 * * * root /home/www.osyunwei.com/osyunwei.sh
35、每天7:55执行
55 7 * * * root /home/www.osyunwei.com/osyunwei.sh
36、每天8:10、16:00、20:00分别执行一次
10 8 * * * root /home/www.osyunwei.com/osyunwei.sh
0 16 * * * root /home/www.osyunwei.com/osyunwei.sh
0 20 * * * root /home/www.osyunwei.com/osyunwei.sh
37、每天7:57、8:00分别执行一次
57 7 * * * root /home/www.osyunwei.com/osyunwei.sh
0 8 * * * root /home/www.osyunwei.com/osyunwei.sh
相关推荐
linux Crontab 使用基础教程.docx
利用Crontab实现对Oracle数据库的定时备份,很实用的一个教程!
主要介绍了linux定时器crontab的使用教程,需要的朋友可以参考下
这个其实可以使用linux 自带了crontab实现,但是毕竟是django 开发。想着不知道有没有方法可以从django 中实现。 简单搜索了下,这方面的方法确实不少。 由于看到celery 插件学习曲线较大,这个小的需求就使用django...
摘要: rsync 是一个快速增量文件传输工具,它可以用于在同一主机备份内部的备份,我们还可以把它作为不同主机网络备份工具之用。本文主要讲述的是如何自架rsync服务器,以实现文件传输、备份和镜像。...
crontab定时器 使用方法和课堂笔记 手把手教学,包括crontab命令参数和介绍,使用方法和例子,实战教程,存放位置和用户文件等,后续会努力上传其他文件和linux运维相关笔记
│ linux视频教程第00讲.开山篇.wmv,网盘文件永久连接 │ linux视频教程第01讲.基础介绍.wmv │ linux视频教程第02讲.... linux视频教程第14讲.crontab详解 linux视频教程第15讲.进程的介绍和管理.
今天在网上看到这篇不错的教程,是介绍CronTab的,写的很清楚.转载过来,做个分享.
使用教程 : 1. 在GitHub或Gitee新建代码仓库,将文件.sh/.bat 和 .txt文件push到代码仓库; 2. 在Windows或Linux系统执行.bat或.sh文件,即可完成100次的提交; 3. 通过数据库的数据表配合脚本使用,完成指定日期...
韩顺平.linux视频教程第14讲.crontab详解.wmv 58 MB 韩顺平.linux视频教程第15讲.进程的介绍和管理.wmv 46 MB 韩顺平.linux视频教程第16讲.top详解.设.间.监控网络状态.wmv 50 MB 韩顺平.linux视频教程第17讲....
网络环、rpm管理.samba安装配置、crontab详解等。Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行主要的UNIX工具软件、应用程序和...
linux离线断网模式下安装crontabs,带教程和对应的rpm文件
这篇是挺实用的教程, 不过有些观点还是值得商榷 我觉得服务器定时器用计划任务调用脚本就可以实现,比如linux下用crontab定时执行某个php脚本,更新数据就可以。 研究所有点缺乏资料啊。讨论的问题怪怪的。只有很少...
基于大数据分析与可视化的疫情信息发布平台源码+项目部署教程.zip 基于大数据分析与可视化的疫情信息发布平台源码+项目部署教程.zip 基于大数据分析与可视化的疫情信息发布平台源码+项目部署教程.zip 1、该资源内...
linux教程: 查看 Linux 命令帮助信息 - 关键词:help, whatis, info, which, whereis, man Linux 文件目录管理 - 关键词:cd, ls, pwd, mkdir, rmdir, tree, touch, ln, rename, stat, file, chmod, chown, locate,...
linux shell编程 教程大全 目 录 译者序 前言 第一部分 shell 第1章 文件安全与权限 1 1.1 文件 1 1.2 文件类型 2 1.3 权限 2 1.4 改变权限位 4 1.4.1 符号模式 4 1.4.2 chmod命令举例 5 1.4.3 绝对模式 5 1.4.4 ...
3.02_02_03_02 Linux Crontab调度讲解 网页.mp4 3.02_02_03_03 大数据Hadoop常用三种调度框架讲解 网页.mp4 3.02_02_03_04 Oozie 功能架构及三大Server讲解 网页.mp4 3.02_02_03_05 Oozie安装部署讲解一 网页.mp4
想到的是cron命令,google了很多教程,都没有成功 在/etc/crontab 中加入了 * * * * * root notify-send [该休息一下啦] 喝水!伸懒腰!动一动! 也用命令编辑了 crontab -e 同时也启动了cron服务 server cron ...
Linux常用的命令及Linux操作系统的相关基础知识,包括crontab,samba服务器等等