💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
# cron模块 任务计划[cron模块](http://docs.ansible.com/ansible/latest/cron_module.html) 执行周期的格式说明 `minute,hour,day,month,weekday` ### 建立任务计划 #### 命令行使用格式 ``` ansible node2.test.com -m cron -a "name=test_cron job='/bin/date > /tmp/tmp.time' weekday=6" ansible node2.test.com -m cron -a "name=test_cron job='/bin/date > /tmp/tmp.time' minute='*/10'" ``` 注意job用单引号 #### 查看任务计划 ``` ansible node2.test.com -m shell -a 'crontab -l' #Ansible: test_cron * * * * 6 /bin/date > /tmp/tmp.time ``` #### 删除任务计划 ``` ansible node2.test.com -m cron -a "name=test_cron state=absent" ```