Class: Ansible::Ruby::Modules::Win_scheduled_task

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb

Overview

Creates/modified or removes Windows scheduled tasks.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#actionsArray<String>, ...

Returns A list of action to configure for the task.,See suboptions for details on how to construct each list entry.,When creating a task there MUST be at least one action but when deleting a task this can be a null or an empty list.,The ordering of this list is important, the module will ensure the order is kept when modifying the task.,This module only supports the C(ExecAction) type but can still delete the older legacy types.

Returns:

  • (Array<String>, String, nil)

    A list of action to configure for the task.,See suboptions for details on how to construct each list entry.,When creating a task there MUST be at least one action but when deleting a task this can be a null or an empty list.,The ordering of this list is important, the module will ensure the order is kept when modifying the task.,This module only supports the C(ExecAction) type but can still delete the older legacy types.



24
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 24

attribute :actions

#allow_demand_startSymbol?

Returns Whether the task can be started by using either the Run command or the Context menu.

Returns:

  • (Symbol, nil)

    Whether the task can be started by using either the Run command or the Context menu.



74
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 74

attribute :allow_demand_start

#allow_hard_terminateSymbol?

Returns Whether the task can be terminated by using TerminateProcess.

Returns:

  • (Symbol, nil)

    Whether the task can be terminated by using TerminateProcess.



78
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 78

attribute :allow_hard_terminate

#authorObject?

Returns The author of the task.

Returns:

  • (Object, nil)

    The author of the task.



58
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 58

attribute :author

#compatibility0, ...

Returns The integer value with indicates which version of Task Scheduler a task is compatible with.,C(0) means the task is compatible with the AT command.,C(1) means the task is compatible with Task Scheduler 1.0.,C(2) means the task is compatible with Task Scheduler 2.0.

Returns:

  • (0, 1, 2, nil)

    The integer value with indicates which version of Task Scheduler a task is compatible with.,C(0) means the task is compatible with the AT command.,C(1) means the task is compatible with Task Scheduler 1.0.,C(2) means the task is compatible with Task Scheduler 2.0.



82
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 82

attribute :compatibility

#dateObject?

Returns The date when the task was registered.

Returns:

  • (Object, nil)

    The date when the task was registered.



61
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 61

attribute :date

#delete_expired_task_afterObject?

Returns The amount of time that the Task Scheduler will wait before deleting the task after it expires.,A task expires after the end_boundary has been exceeded for all triggers associated with the task.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).

Returns:

  • (Object, nil)

    The amount of time that the Task Scheduler will wait before deleting the task after it expires.,A task expires after the end_boundary has been exceeded for all triggers associated with the task.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).



86
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 86

attribute :delete_expired_task_after

#descriptionString?

Returns The description of the task.

Returns:

  • (String, nil)

    The description of the task.



64
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 64

attribute :description

#disallow_start_if_on_batteriesSymbol?

Returns Whether the task will not be started if the computer is running on battery power.

Returns:

  • (Symbol, nil)

    Whether the task will not be started if the computer is running on battery power.



89
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 89

attribute :disallow_start_if_on_batteries

#display_nameObject?

Returns The name of the user/group that is displayed in the Task Scheduler UI.

Returns:

  • (Object, nil)

    The name of the user/group that is displayed in the Task Scheduler UI.



32
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 32

attribute :display_name

#enabledSymbol?

Returns Whether the task is enabled, the task can only run when C(yes).

Returns:

  • (Symbol, nil)

    Whether the task is enabled, the task can only run when C(yes).



93
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 93

attribute :enabled

#execution_time_limitObject?

Returns The amount of time allowed to complete the task.,When not set, the time limit is infinite.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).

Returns:

  • (Object, nil)

    The amount of time allowed to complete the task.,When not set, the time limit is infinite.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).



97
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 97

attribute :execution_time_limit

#groupObject?

Returns The group that will run the task.,C(group) and C(username) are exclusive to each other and cannot be set at the same time.,C(logon_type) can either be not set or equal C(group).

Returns:

  • (Object, nil)

    The group that will run the task.,C(group) and C(username) are exclusive to each other and cannot be set at the same time.,C(logon_type) can either be not set or equal C(group).



35
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 35

attribute :group

#hiddenSymbol?

Returns Whether the task will be hidden in the UI.

Returns:

  • (Symbol, nil)

    Whether the task will be hidden in the UI.



100
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 100

attribute :hidden

#logon_type:none, ...

Returns The logon method that the task will run with.,C(password) means the password will be stored and the task has access to network resources.,C(s4u) means the existing token will be used to run the task and no password will be stored with the task. Means no network or encrypted files access.,C(interactive_token) means the user must already be logged on interactively and will run in an existing interactive session.,C(group) means that the task will run as a group.,C(service_account) means that a service account like System, Local Service or Network Service will run the task.

Returns:

  • (:none, :password, :s4u, :interactive_token, :group, :service_account, :token_or_password, nil)

    The logon method that the task will run with.,C(password) means the password will be stored and the task has access to network resources.,C(s4u) means the existing token will be used to run the task and no password will be stored with the task. Means no network or encrypted files access.,C(interactive_token) means the user must already be logged on interactively and will run in an existing interactive session.,C(group) means that the task will run as a group.,C(service_account) means that a service account like System, Local Service or Network Service will run the task.



38
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 38

attribute :logon_type

#multiple_instances0, ...

Returns An integer that indicates the behaviour when starting a task that is already running.,C(0) will start a new instance in parallel with existing instances of that task.,C(1) will wait until other instances of that task to finish running before starting itself.,C(2) will not start a new instance if another is running.,C(3) will stop other instances of the task and start the new one.

Returns:

  • (0, 1, 2, 3, nil)

    An integer that indicates the behaviour when starting a task that is already running.,C(0) will start a new instance in parallel with existing instances of that task.,C(1) will wait until other instances of that task to finish running before starting itself.,C(2) will not start a new instance if another is running.,C(3) will stop other instances of the task and start the new one.



104
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 104

attribute :multiple_instances

#nameString

Returns The name of the scheduled task without the path.

Returns:

  • (String)

    The name of the scheduled task without the path.



12
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 12

attribute :name

#passwordString?

Returns The password for the user account to run the scheduled task as.,This is required when running a task without the user being logged in, excluding the builtin service accounts.,If set, will always result in a change unless C(update_password) is set to C(no) and no othr changes are required for the service.

Returns:

  • (String, nil)

    The password for the user account to run the scheduled task as.,This is required when running a task without the user being logged in, excluding the builtin service accounts.,If set, will always result in a change unless C(update_password) is set to C(no) and no othr changes are required for the service.



50
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 50

attribute :password

#pathString?

Returns Task folder in which this task will be stored.,Will create the folder when C(state=present) and the folder does not already exist.,Will remove the folder when C(state=absent) and there are no tasks left in the folder.

Returns:

  • (String, nil)

    Task folder in which this task will be stored.,Will create the folder when C(state=present) and the folder does not already exist.,Will remove the folder when C(state=absent) and there are no tasks left in the folder.



16
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 16

attribute :path

#priorityInteger?

Returns The priority level (0-10) of the task.,When creating a new task the default if C(7).,See U(msdn.microsoft.com/en-us/library/windows/desktop/aa383512.aspx) for details on the priority levels.

Returns:



108
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 108

attribute :priority

#restart_countInteger?

Returns The number of times that the Task Scheduler will attempt to restart the task.

Returns:

  • (Integer, nil)

    The number of times that the Task Scheduler will attempt to restart the task.



112
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 112

attribute :restart_count

#restart_intervalObject?

Returns How long the Task Scheduler will attempt to restart the task.,If this is set then C(restart_count) must also be set.,The maximum allowed time is 31 days.,The minimum allowed time is 1 minute.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).

Returns:

  • (Object, nil)

    How long the Task Scheduler will attempt to restart the task.,If this is set then C(restart_count) must also be set.,The maximum allowed time is 31 days.,The minimum allowed time is 1 minute.,This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]MS).



116
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 116

attribute :restart_interval

#run_level:limited, ...

Returns The level of user rights used to run the task.,If not specified the task will be created with limited rights.

Returns:

  • (:limited, :highest, nil)

    The level of user rights used to run the task.,If not specified the task will be created with limited rights.



42
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 42

attribute :run_level

#run_only_if_idleSymbol?

Returns Whether the task will run the task only if the computer is in an idle state.

Returns:

  • (Symbol, nil)

    Whether the task will run the task only if the computer is in an idle state.



119
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 119

attribute :run_only_if_idle

#run_only_if_network_availableSymbol?

Returns Whether the task will run only when a network is available.

Returns:

  • (Symbol, nil)

    Whether the task will run only when a network is available.



123
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 123

attribute :run_only_if_network_available

#sourceObject?

Returns The source of the task.

Returns:

  • (Object, nil)

    The source of the task.



68
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 68

attribute :source

#start_when_availableSymbol?

Returns Whether the task can start at any time after its scheduled time has passed.

Returns:

  • (Symbol, nil)

    Whether the task can start at any time after its scheduled time has passed.



127
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 127

attribute :start_when_available

#state:absent, ...

Returns When C(state=present) will ensure the task exists.,When C(state=absent) will ensure the task does not exist.

Returns:

  • (:absent, :present, nil)

    When C(state=present) will ensure the task exists.,When C(state=absent) will ensure the task does not exist.



20
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 20

attribute :state

#stop_if_going_on_batteriesSymbol?

Returns Whether the task will be stopped if the computer begins to run on battery power.

Returns:

  • (Symbol, nil)

    Whether the task will be stopped if the computer begins to run on battery power.



131
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 131

attribute :stop_if_going_on_batteries

#triggersArray<String>, ...

Returns A list of triggers to configure for the task.,See suboptions for details on how to construct each list entry.,The ordering of this list is important, the module will ensure the order is kept when modifying the task.,There are multiple types of triggers, see U(msdn.microsoft.com/en-us/library/windows/desktop/aa383868.aspx) for a list of trigger types and their options.,The suboption options listed below are not required for all trigger types, read the description for more details.

Returns:

  • (Array<String>, String, nil)

    A list of triggers to configure for the task.,See suboptions for details on how to construct each list entry.,The ordering of this list is important, the module will ensure the order is kept when modifying the task.,There are multiple types of triggers, see U(msdn.microsoft.com/en-us/library/windows/desktop/aa383868.aspx) for a list of trigger types and their options.,The suboption options listed below are not required for all trigger types, read the description for more details.



28
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 28

attribute :triggers

#update_password:yes, ...

Returns Whether to update the password even when not other changes have occured.,When C(yes) will always result in a change when executing the module.

Returns:

  • (:yes, :no, nil)

    Whether to update the password even when not other changes have occured.,When C(yes) will always result in a change when executing the module.



54
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 54

attribute :update_password

#usernameString?

Returns The user to run the scheduled task as.,Will default to the current user under an interactive token if not specified during creation.

Returns:

  • (String, nil)

    The user to run the scheduled task as.,Will default to the current user under an interactive token if not specified during creation.



46
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 46

attribute :username

#versionObject?

Returns The version number of the task.

Returns:

  • (Object, nil)

    The version number of the task.



71
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 71

attribute :version

#wake_to_runSymbol?

Returns Whether the task will wake the computer when it is time to run the task.

Returns:

  • (Symbol, nil)

    Whether the task will wake the computer when it is time to run the task.



135
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 135

attribute :wake_to_run