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. 3 react 简书 添加 头部搜索动态效果

    1. 添加动态效果组件 yarn add react-transition-group 2. 修改 src/common/header/index.js import React, {Componen ...

  2. 对OpenSSL心脏出血漏洞的试验

    1.安装OpenSSL环境 sudo apt-get install openssl sudo pip install pyopenssl(中间会提示ffi.h 没有那个文件或目录,sudo apt- ...

  3. 春节宅家火了短视频,手游 APP 成最大赢家!

    春节历来是APP运营者翘首以盼的火热期,但2020年的春节有些特殊, 新型冠状病毒的爆发,牵动着全国亿万人民的心.响应号召不出门,宅在家里玩手机,于是打游戏.看新闻.追剧等成为大家打发时间.疏解内心压 ...

  4. No enclosing instance of type test is accessible. Must qualify the allocation with an enclosing inst

    今日遇到一个报错如下: No enclosing instance of type test is accessible. Must qualify the allocation with an en ...

  5. 【转】centos7轻松搭建文件服务器

    1.安装apache服务器 yum install httpd 2:启动httpd服务 service httpd start 3:查看httpd服务器的版本 4:修改访问端口和文件路径,以防端口冲突 ...

  6. 51nod 1438:方阵与完全平方数

    1438 方阵与完全平方数 题目来源: mostleg 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题  收藏  关注 如果一个由正整数组成的n*n的方阵,满足以下 ...

  7. Idea 中的快捷键(mac)

    Mac键盘符号和修饰键说明 ⌘ Command ⇧ Shift ⌥ Option ⌃ Control ↩︎ Return/Enter ⌫ Delete ⌦ 向前删除键(Fn+Delete) ↑ 上箭头 ...

  8. 备份 分区表 mbr

    备份方法:   1.备份分区表信息 sudo fdisk -l >hda.txt  #分区表信息重定向输出到文件中 2.备份MBR linux@linux-desktop:~/ex$ sudo ...

  9. one_day_one_linuxCmd---光标快捷操作

    <坚持每天学习一个 linux 命令,今天我们来学习 切换光标的常用命令> 摘要:最近经常使用 xshell 软件来远程连接各种机器,在 bin/bash 下输入各种命令,因为都是一些非常 ...

  10. TypeError: TF_SessionRun_wrapper: expected all values in input dict to be ndarray.

    在用Embedding时出现了这个问题,具体的代码: model.add(Embedding(input_dim = vocab_size, output_dim = embedding_vector ...