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. 算法5:队列——解密 QQ 号

    新学期开始了,小哈是小哼的新同桌(小哈是个小美女哦~),小哼向小哈询问 QQ 号,小哈当然不会直接告诉小哼啦,原因嘛你懂的.所以小哈给了小哼一串加密过的数字,同时小哈也告诉了小哼解密规则.规则是这样的 ...

  2. 下页小希学MVC5+EF6.2 学习记录三

      目的:1 学习mvc+ef 2  写下日记也是对自己的督促 期待已久的EF终于来了. 学完本篇文章,你将会掌握基于EF数据模型的完整开发流程. 本次将会完成EF数据模型的搭建和使用. 基于这个模型 ...

  3. 菜鸟理解Lamdba表达式

    简单的说就是Java 1.8后给出个简化代码的方式, Java面向对象过分强调必须通过对象的形式来完成任务,而函数思想则尽量忽略面向对象的复杂语法,强调做什么,而不是以什么形式做. 举个栗子! 首先创 ...

  4. SQL的查询结果复制到Excel 带标题Head 有换行符导致换行错乱 的解决方案

    将SQL查询到的结果保存为excel有很多方法,其中最简单的就是直接复制粘贴了 1.带Head的复制粘贴 1)先左击红色区域实现选择所有数据 2)随后右击选择Copy with Headers  再粘 ...

  5. Aizu 2155 Magic Slayer 背包DP

    这是上上次对抗赛的题目了 其实现在发现整个代码从头到尾,都是用了背包,怪我们背包没深入学好. 比赛的时候,聪哥提出的一种思路是,预处理一下,背包出 ALL攻击 和 single攻击的 血量对应的最小花 ...

  6. Hour of Code|京东云邀您一起,“码”上行动

    "如果我并不希望成为一名程序员,那么为什么需要学习编程呢?" 相信很多人对于现在鼓励从小就学习编程的趋势都在心里问过这样的一个问题.在回答这个问题前,先和大家分享一个小故事吧. 1 ...

  7. C#高级编程(第9版) 第10章 集合 笔记

    话说 虽然敲过好多代码, 但除了C++,一直没正眼瞧过其它语言.(没办法 谁叫C++既有oop又能自由控制内存呢) 今天 看公司老项目的src,c#的,linq+Dictionary的用法有感.所以找 ...

  8. MySql 的操作指令(window)

    1.登录: mysql -uroot -p 2.查看所有数据库: show databases 3.切换数据库       : use databasename(数据库名称) 4.查看数据库的所有表格 ...

  9. ARDUINO+MCP2515实现CAN通讯接收

    我的学习过程有几个关键点: 1.MCP2515 CAN总线模块与ARDUINO UNO R3的接线方式: 2.程序set_mask_filter_recv的参数设置,mcp_can_dfs.h库文件设 ...

  10. 用python3读csv文件出现UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 0: invalid continuation byte

    1.python3读取csv文件时报如下图所示的错误 2.分析原因:读取的csv文件不是 UTF8 编码的,而IDE工具默认采用 UTF8 解码.解决方法是修改源文件的解码方式. 3.使用nodepa ...