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是一种全新的基础设施管理方式,是一个服务器基础架构集中 ...
随机推荐
- 下页小希学MVC5+EF6.2 学习记录二
目的:1 学习mvc+ef 2 写下日记也是对自己的督促 从前端的UI开始 MVC分离的比较好,开发顺序没有特别要求,先开发哪一部分都可以,这次我们主要讲解前端UI的部分. ASP.NET MVC抛 ...
- Vulkan SDK之 CommandBuff
Basic Command Buffer Operation 调用指定的api, 驱动将命令放入指定的buff当中. 在其他图形API(dx,or opengl) ,glsetlinewidth驱动会 ...
- python实现微信发送服务器监控报警消息代码实现
这篇文章主要介绍了python3.8 微信发送服务器监控报警消息代码实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 ! python版本 > ...
- UVALive 3977 BFS染色
这个题意搞了半天才搞明白 就是如果定义一个d-summit,即从该点到另一个更高的点,经过的路径必定是比当前点低至少d高度的,如果该点是最高点,没有比他更高的,就直接视为顶点 其实就是个BFS染色,先 ...
- 吴裕雄--天生自然JAVA SPRING框架开发学习笔记:Spring JDK动态代理
JDK 动态代理是通过 JDK 中的 java.lang.reflect.Proxy 类实现的.下面通过具体的案例演示 JDK 动态代理的使用. 1. 创建项目 在 MyEclipse 中创建一个名称 ...
- docker修改存储路径(转载)
系统盘只有40G,有时docker镜像会占据大量的存储空间,于是想把docker的默认存储位置改成挂载的数据盘.docker的默认存储位置未为:/var/lib/docker 更改docker的默认存 ...
- 理解Spring Boot Actuator
Spring Boot Actuator 用于监控和管理spring应用,可通过HTTP Endpoint或JMX Bean与其交互.
- POJ 3126:Prime Path
Prime Path Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit St ...
- jQuery实现轮播图--入门
jQuery是一个前台的框架. 主要函数: setInterval 语法:setInterval(code,millisec[,"lang"]) cdoe:需要执行的代码或者要调用 ...
- 新iPhone要推出双卡双待这事是真的吗?
自2007年发布以来,iPhone似乎一直都是"异类"--以自己独特的方式走着一条引领智能手机前进的路!如,在当年遍地按键键盘的年代,iPhone以触摸屏的奇葩姿态引领了新潮流:刚 ...