zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    gain 基尼系数
    luogu P5826 【模板】子序列自动机 主席树 vector 二分
    牛客挑战赛39 树与异或 离线 树上莫队 树状数组 约数
    4.22 省选模拟赛 三元组 manacher 回文自动机
    4.22 省选模拟赛 最优价值 网络流 最大权闭合子图
    4.18 省选模拟赛 消息传递 树剖 倍增 线段树维护等比数列
    luogu P4008 [NOI2003]文本编辑器 splay 块状链表
    牛客挑战赛39 密码系统 后缀数组
    luogu P1526 [NOI2003]智破连环阵 搜索+最大匹配+剪枝
    luogu P4095 [HEOI2013]Eden 的新背包问题 多重背包 背包的合并
  • 原文地址:https://www.cnblogs.com/gavin11/p/11605999.html
Copyright © 2011-2022 走看看