然后就是执行 crontab -e 来添加你的任务 如: 每天凌晨1:00执行备份程序:00 01 * * * 这里你要执行的命令(你看不见我,看不见我:)) crontab -l ...
分类:
其他好文 时间:
2017-08-14 01:30:32
阅读次数:
135
一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。 按顺序依次为 秒(0~59) 分钟(0~59) 小时(0~23) 天(月)(0~31,但是你需要考虑你月的天数) 月(0~11) 天(星期)(1~7 1=SUN 或 SUN,MON,TUE,WED,THU,FRI,SAT) 7.年份( ...
分类:
编程语言 时间:
2017-08-12 20:34:49
阅读次数:
174
1、/etc/ansible/hosts 文件配置如下: 2、远程重启服务 3、查看远程主机名 4、复制文件 5、下载文件到远程主机的指定目录 6、linux平台安装软件 7、cron模块 8、mount模块:远程主机挂载硬盘 9、user模块 ...
分类:
其他好文 时间:
2017-08-10 19:31:01
阅读次数:
162
常用模块:cron,cmd,file,mount,ntp,pkg,service,user,group cmd模块 参数: name:要执行的命令 unless:用于检查的命令,只有unless指向的命令返回False时才执行name那行的命令 cwd:执行命令时的目录,默认为root user:以 ...
分类:
其他好文 时间:
2017-08-09 18:04:09
阅读次数:
198
清理/var/spool/clientmqueue目录可以释放大量空间,具体命令是:ls | xargs rm -f ...
分类:
其他好文 时间:
2017-08-08 19:43:09
阅读次数:
134
什么是cron表达式: cron表达式主要是用在Quartz框架中,Quartz是一个完全由java编写的开源作业调度框架,最主要的功能就是调度器(完成定时任务),可以与javaEE或者javaSE应用程序相结合也可以单独使用,能借助关系数据库和JDBC作业存储支持集群,负载均衡。 CronTrig ...
分类:
其他好文 时间:
2017-08-07 18:26:22
阅读次数:
207
创建web服务器(LAMP):#optimizationbyonekeysed-i‘s#SELINUX=enforcing#SELINUX=disabled#‘/etc/selinux/configgrepSELINUX=disabled/etc/selinux/configsetenforce0getenforce/etc/init.d/iptablesstop/etc/init.d/iptablesstopchkconfigiptablesoffchkconfig|egrep-v"cron..
分类:
Web程序 时间:
2017-08-07 01:34:56
阅读次数:
295
创建备份服务器:ntp+cronrsync--daemon#optimizationbyonekeysed-i‘s#SELINUX=enforcing#SELINUX=disabled#‘/etc/selinux/configgrepSELINUX=disabled/etc/selinux/configsetenforce0getenforce/etc/init.d/iptablesstop/etc/init.d/iptablesstopchkconfigiptablesoffchkconfi..
分类:
其他好文 时间:
2017-08-07 01:32:46
阅读次数:
248
创建负载均衡服务器lb02:#optimizationbyonekeysed-i‘s#SELINUX=enforcing#SELINUX=disabled#‘/etc/selinux/configgrepSELINUX=disabled/etc/selinux/configsetenforce0getenforce/etc/init.d/iptablesstop/etc/init.d/iptablesstopchkconfigiptablesoffchkconfig|egrep-v"cron..
分类:
其他好文 时间:
2017-08-07 01:24:28
阅读次数:
221