SaltStack schedule功能
1、确保计划中没有作业
salt.states.schedule.absent(name, **kwargs)
2、确保在计划中禁用的作业
salt.states.schedule.disabled(name, **kwargs)
3、确保在计划中启用了作业
salt.states.schedule.enabled(name, **kwargs)
4、确保计划中有作业
salt.states.schedule.present(name, **kwargs)
参数:
name
The unique name that is given to the scheduled job.
seconds
The scheduled job will be executed after the specified number of seconds have passed.
minutes
The scheduled job will be executed after the specified number of minutes have passed.
hours
The scheduled job will be executed after the specified number of hours have passed.
days
The scheduled job will be executed after the specified number of days have passed.
when
This will schedule the job at the specified time(s). The when parameter must be a single value or a dictionary with the date string(s) using the dateutil format. Requires python-dateutil.
cron
This will schedule the job at the specified time(s) using the crontab format. Requires python-croniter.
run_on_start
Whether the job will run when Salt minion start. Value should be a boolean.
function
The function that should be executed by the scheduled job.
job_args
The arguments that will be used by the scheduled job.
job_kwargs
The keyword arguments that will be used by the scheduled job.
maxrunning
Ensure that there are no more than N copies of a particular job running.
jid_include
Include the job into the job cache.
splay
The amount of time in seconds to splay a scheduled job. Can be specified as a single value in seconds or as a dictionary range with 'start' and 'end' values.
range
This will schedule the command within the range specified. The range parameter must be a dictionary with the date strings using the dateutil format. Requires python-dateutil.
once
This will schedule a job to run once on the specified date.
once_fmt
The default date format is ISO 8601 but can be overridden by also specifying the once_fmt option.
enabled
Whether the job should be enabled or disabled. Value should be a boolean.
return_job
Whether to return information to the Salt master upon job completion.
metadata
Using the metadata parameter special values can be associated with a scheduled job. These values are not used in the execution of the job, but can be used to search for specific jobs later if combined with the return_job parameter. The metadata parameter must be specified as a dictionary, othewise it will be ignored.
returner
The returner to use to return the results of the scheduled job.
return_config
The alternative configuration to use for returner configuration options.
return_kwargs
Any individual returner configuration items to override. Should be passed as a dictionary.
persist
Whether the job should persist between minion restarts, defaults to True.
skip_during_range
This will ensure that the scheduled command does not run within the range specified. The range parameter must be a dictionary with the date strings using the dateutil format. Requires python-dateutil.
run_after_skip_range
Whether the job should run immediately after the skip_during_range time period ends.
SaltStack schedule功能的更多相关文章
- Saltstack
一.Satlstack的概述 Saltstack是什么? Salt是一种和以往不同的基础设施管理方法,它是建立在大规模系统高速通讯能力可以大幅提升的想法上.这种方法使得Salt成为一个强大的能够解决基 ...
- saltstack批量管理文件和计划任务
简介 saltstack是由thomas Hatch于创建的一个开源项目,设计初衷是为了实现一个快速的远程执行系统.用来管理你的基础架构,可轻松管理成千上万台服务器. 关于saltstack更多功能本 ...
- saltstack实战4--综合练习2
Saltstack配置管理-功能模块-安装haproxy 配置管理,我们分了3层 最底层是系统初始化部分 倒数二层是功能模块,就是具体的产品的安装了 假如你的环境需要nginx,php,memcach ...
- Saltstack自动化运维
Saltstack三大功能 1,远程执行 2,配置管理(状态) 3,云管理 四种运行方式: Local 本地 Minion/Master C/S Syndic 代理模式 Salt S ...
- 1、自动化运维之SaltStack实践
自动化运维之SaltStack实践 1.1.环境 linux-node1(master服务端) 192.168.0.15 linux-node2(minion客户端) 192.168.0.16 1.2 ...
- Saltstack自动化操作记录(1)-环境部署【转】
早期运维工作中用过稍微复杂的Puppet,下面介绍下更为简单实用的Saltstack自动化运维的使用. Saltstack知多少Saltstack是一种全新的基础设施管理方式,是一个服务器基础架构集中 ...
- saltstack 入门
1.Saltstack是什么? saltstack 是一个异构平台基础设施管理工具,具有远程执行.配置管理.云管理.只需花费数分钟就可以运行起来,扩展性足以支撑上万台服务器,速度快,服务器之间秒级通讯 ...
- saltstack一
Saltstack概述 Salt一种全新的基础设施管理方式,部署轻松,在几分钟内可运行起来,扩展性好,很容易管理上万台服务器,速度够快,服务器之间秒级通讯. salt底层采用动态的连接总线, 使其可以 ...
- Saltstack自动化操作记录(1)-环境部署
早期运维工作中用过稍微复杂的Puppet,下面介绍下更为简单实用的Saltstack自动化运维的使用. Saltstack知多少Saltstack是一种全新的基础设施管理方式,是一个服务器基础架构集中 ...
随机推荐
- 大二暑假第二周总结--开始学习Hadoop基础(一)
一.简单视频学习Hadoop的处理架构 二.简单视频学习分布式文件系统HDFS并进行简单的实践操作 简单操作教程:http://dblab.xmu.edu.cn/blog/290-2/ 注意:在建立H ...
- HDU_1059 多重背包问题
F - Dividing Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit ...
- swtich多个case使用同一操作
switch (expression) { case 'status01': case 'status02': case 'status03': alert('resultOne'); break; ...
- tensorflow中的神经网络笔记
1.NN----神经网络 2.CNN卷积神经网络 CNN网络一共有5个层级结构: 输入层 卷积层 激活层 池化层 全连接FC层 一.输入层 与传统神经网络/机器学习一样,模型需要输入的进行预处理操作, ...
- torch.Tensor文档学习笔记
A torch.Tensor is a multi-dimensional matrix containing elements of a single data type. 张量(torch.Ten ...
- BZOJ 4084 [Sdoi2015]双旋转字符串
题解:hash 至今不会unsigned long long 的输出 把B扔进map 找A[mid+1][lenA]在A[1][mid]中的位置 把A[1][mid]贴两遍(套路) 枚举A[mid+1 ...
- mysql建表语句和数据类型
1.创建表的完整语法 create table 表名( 字段名称 数据类型[(长度) 约束条件], 字段名称 数据类型[(长度) 约束条件] ) 必须的:字段名 数据类型 表名 可选的:长度 约束 ...
- {转} MJPG流媒体在HTML5的呈现方案
最近碰到的需求:监控探头视频呈现到html页面上. 视频源协议:HLS; 视频源格式:Motion JPEG 简称 MJPG; 其中Motion JPEG(M-JPEG或MJPEG,Motion Jo ...
- servlet-api api文档获取请求参数
1.假如有个get请求后面带有的参数如下: a=b&a2=b2&a3=b3&a4=b4. 如果想获取所有的key,value.这个时候可以根据request的getQueryS ...
- nodejs(9)使用arttemplate渲染动态页面
使用arttemplate渲染动态页面 安装 两个包 npm i art-template express-art-template -S 自定义一个模板引擎 app.engine('自定义模板引擎的 ...