zoukankan      html  css  js  c++  java
  • Saltstack module cron 详解

    cron.write_cron_file

    Writes the contents of a file to a user's crontab
    
    CLI Example:
    
        salt '*' cron.write_cron_file root /tmp/new_cron
    
    Changed in version 2015.8.9
    
    Note:
    
        Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)
    

    cron.raw_cron

    Return the contents of the user's crontab
    
    CLI Example:
    
        salt '*' cron.raw_cron root
    

    cron.rm

    This function is an alias of rm_job.

    Remove a cron job for a specified user. If any of the day/time params are
    specified, the job will only be removed if the specified params match.
    
    CLI Example:
    
        salt '*' cron.rm_job root /usr/local/weekly
        salt '*' cron.rm_job root /usr/bin/foo dayweek=1
    

    cron.list_tab

    Return the contents of the specified user's crontab
    
    CLI Example:
    
        salt '*' cron.list_tab root
    

    cron.write_cron_file_verbose

    Writes the contents of a file to a user's crontab and return error message on error
    
    CLI Example:
    
        salt '*' cron.write_cron_file_verbose root /tmp/new_cron
    
    Changed in version 2015.8.9
    
    Note:
    
        Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)
    

    cron.rm_env

    Remove cron environment variable for a specified user.
    
    CLI Example:
    
        salt '*' cron.rm_env root MAILTO
    

    cron.set_job

    Sets a cron job up for a specified user.
    
    CLI Example:
    
        salt '*' cron.set_job root '*' '*' '*' '*' 1 /usr/local/weekly
    

    cron.set_env

    Set up an environment variable in the crontab.
    
    CLI Example:
    
        salt '*' cron.set_env root MAILTO user@example.com
    

    cron.rm_special

    Remove a special cron job for a specified user.
    
    CLI Example:
    
        salt '*' cron.rm_special root /usr/bin/foo
    

    cron.set_special

    Set up a special command in the crontab.
    
    CLI Example:
    
        salt '*' cron.set_special root @hourly 'echo foobar'
    

    cron.rm_job

    Remove a cron job for a specified user. If any of the day/time params are
    specified, the job will only be removed if the specified params match.
    
    CLI Example:
    
        salt '*' cron.rm_job root /usr/local/weekly
        salt '*' cron.rm_job root /usr/bin/foo dayweek=1
    

    cron.ls

    This function is an alias of list_tab.

    Return the contents of the specified user's crontab
    
    CLI Example:
    
        salt '*' cron.list_tab root
  • 相关阅读:
    程序设计课程技巧小总结
    《大学之路》读后感(1)
    《世界是数字的》读后感(4)
    《世界是数字的》读后感(3)
    《世界是数字的》读后感(2)
    《世界是数字的》读后感(1)——第一部分 硬件
    独立思考的能力——《不要等到毕业以后》读后感(2)
    迷茫且鉴定——《不要等到毕业以后》读后感(1)
    HashTable HashMap区分
    使用media query 来实现响应式设计
  • 原文地址:https://www.cnblogs.com/randomlee/p/Saltstack_module_cron.html
Copyright © 2011-2022 走看看