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功能的更多相关文章

  1. Saltstack

    一.Satlstack的概述 Saltstack是什么? Salt是一种和以往不同的基础设施管理方法,它是建立在大规模系统高速通讯能力可以大幅提升的想法上.这种方法使得Salt成为一个强大的能够解决基 ...

  2. saltstack批量管理文件和计划任务

    简介 saltstack是由thomas Hatch于创建的一个开源项目,设计初衷是为了实现一个快速的远程执行系统.用来管理你的基础架构,可轻松管理成千上万台服务器. 关于saltstack更多功能本 ...

  3. saltstack实战4--综合练习2

    Saltstack配置管理-功能模块-安装haproxy 配置管理,我们分了3层 最底层是系统初始化部分 倒数二层是功能模块,就是具体的产品的安装了 假如你的环境需要nginx,php,memcach ...

  4. Saltstack自动化运维

    Saltstack三大功能 1,远程执行 2,配置管理(状态) 3,云管理 四种运行方式: Local         本地 Minion/Master C/S Syndic  代理模式 Salt S ...

  5. 1、自动化运维之SaltStack实践

    自动化运维之SaltStack实践 1.1.环境 linux-node1(master服务端) 192.168.0.15 linux-node2(minion客户端) 192.168.0.16 1.2 ...

  6. Saltstack自动化操作记录(1)-环境部署【转】

    早期运维工作中用过稍微复杂的Puppet,下面介绍下更为简单实用的Saltstack自动化运维的使用. Saltstack知多少Saltstack是一种全新的基础设施管理方式,是一个服务器基础架构集中 ...

  7. saltstack 入门

    1.Saltstack是什么? saltstack 是一个异构平台基础设施管理工具,具有远程执行.配置管理.云管理.只需花费数分钟就可以运行起来,扩展性足以支撑上万台服务器,速度快,服务器之间秒级通讯 ...

  8. saltstack一

    Saltstack概述 Salt一种全新的基础设施管理方式,部署轻松,在几分钟内可运行起来,扩展性好,很容易管理上万台服务器,速度够快,服务器之间秒级通讯. salt底层采用动态的连接总线, 使其可以 ...

  9. Saltstack自动化操作记录(1)-环境部署

    早期运维工作中用过稍微复杂的Puppet,下面介绍下更为简单实用的Saltstack自动化运维的使用. Saltstack知多少Saltstack是一种全新的基础设施管理方式,是一个服务器基础架构集中 ...

随机推荐

  1. Toolbar融入状态栏实现沉浸式遇到的问题

    这里写一个纠结我一下午的问题,目的是写一个toolbar和状态栏相融合的沉浸式的样子,遇到各种各样的问题,还好最后慢慢解决了. 一.首先在活动中将状态栏设为透明 @Override protected ...

  2. GitHub 网站上不去/加载慢/加载不全 解决办法

    1. 当你打开你的 GitHub 2. F12 进入检查页面,点击 network 3. 找到变红的字段右键复制连接 4. 打开 DNS 查询网站,输入你复制的网址,点击查询 5. 选择国内的 ip ...

  3. 对于AVL树和红黑树的理解

    AVL又称(严格)高度平衡的二叉搜索树,也叫二叉查找树.平衡二叉树.window对进程地址空间的管理用到了AVL树. 红黑树是非严格平衡二叉树,统计性能要好于平衡二叉树.广泛的在C++的STL中,ma ...

  4. sqlserver 存储过程 C#调用 实现从数据库Get数据

    在最近的项目中我想建立一个EFDBfirst的模型但是失败了,生成的edmx中没有实体类和表结构,到处需求解决方案,未果. 问题请见:https://q.cnblogs.com/q/102743/ 后 ...

  5. 高质量Contrast Essay写作的结构分享

    很多留学生对于Contrast Essay写作不是很了解,拿不到高分也是常有的事,那么大家要如何彻底掌握Contrast Essay写作呢?今天小编就给同学们分享Contrast Essay写作的结构 ...

  6. mini2440 裸机程序,下载到nand 里面,复制到 sdram 中不运行

    按照韦东山的视频中 sdram的裸机代码,写了一份,通过 minitools 下载到 0x30000000,然后烧录到 nand中,接过不能正常运行. 尝试过多种方法后,只有一种解决方法,就是不要用 ...

  7. springboot 启动时加载数据库数据到本地Map

    InitDataConfig.java import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Dict; impo ...

  8. Day 7:TreeSet

    补充上一日:HashCode方法默认返回的是内存地址,String类已经重写了对象的HashCode方法 方法细节:取出数组中的值或字符串的值按照规定计算返回一个值,如果两个字符串内容一致就会返回相同 ...

  9. Java基础查漏补缺(2)

    Java基础查漏补缺(2) apache和spring都提供了BeanUtils的深度拷贝工具包 +=具有隐形的强制转换 object类的equals()方法容易抛出空指针异常 String a=nu ...

  10. POJ 3438:Look and Say

    Look and Say Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 9196   Accepted: 5566 Desc ...