mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 01:14:03 -07:00
Ability to add/remove scheduled task
This commit is contained in:
parent
21d1cd81f7
commit
28164d2ae4
2 changed files with 146 additions and 31 deletions
|
@ -1,8 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2015, Peter Mounce <public@neverrunwithscissors.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
|
@ -32,20 +29,45 @@ options:
|
|||
name:
|
||||
description:
|
||||
- Name of the scheduled task
|
||||
- Supports * as wildcard
|
||||
required: true
|
||||
enabled:
|
||||
description:
|
||||
- State that the task should become
|
||||
- Enable/disable the task
|
||||
required: false
|
||||
choices:
|
||||
- yes
|
||||
- no
|
||||
default: yes
|
||||
author: Peter Mounce
|
||||
state:
|
||||
description:
|
||||
- State that the task should become
|
||||
required: false
|
||||
choices:
|
||||
- present
|
||||
- absent
|
||||
execute:
|
||||
description:
|
||||
- Command the scheduled task should execute
|
||||
required: false
|
||||
frequency:
|
||||
description:
|
||||
- The frequency of the command
|
||||
choices:
|
||||
- daily
|
||||
- weekly
|
||||
required: false
|
||||
time:
|
||||
description:
|
||||
- Time to execute scheduled task
|
||||
required: false
|
||||
path:
|
||||
description:
|
||||
- Folder path of scheduled task
|
||||
default: '\'
|
||||
required: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Disable the scheduled tasks with "WindowsUpdate" in their name
|
||||
win_scheduled_task: name="*WindowsUpdate*" enabled=no
|
||||
# Create a scheduled task to open a command prompt
|
||||
win_scheduled_task: name="TaskName" execute="cmd" frequency="daily" time="9am" description="open command prompt" path="example" enable=yes state=present
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue