Class: Ansible::Ruby::Modules::Win_scheduled_task
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Win_scheduled_task
- Defined in:
- lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb
Overview
Creates/modified or removes Windows scheduled tasks.
Instance Method Summary collapse
-
#actions ⇒ Array<String>, ...
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.
-
#allow_demand_start ⇒ Symbol?
Whether the task can be started by using either the Run command or the Context menu.
-
#allow_hard_terminate ⇒ Symbol?
Whether the task can be terminated by using TerminateProcess.
-
#author ⇒ Object?
The author of the task.
-
#compatibility ⇒ 0, ...
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.
-
#date ⇒ Object?
The date when the task was registered.
-
#delete_expired_task_after ⇒ Object?
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).
-
#description ⇒ String?
The description of the task.
-
#disallow_start_if_on_batteries ⇒ Symbol?
Whether the task will not be started if the computer is running on battery power.
-
#display_name ⇒ Object?
The name of the user/group that is displayed in the Task Scheduler UI.
-
#enabled ⇒ Symbol?
Whether the task is enabled, the task can only run when C(yes).
-
#execution_time_limit ⇒ Object?
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).
-
#group ⇒ Object?
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).
-
#hidden ⇒ Symbol?
Whether the task will be hidden in the UI.
-
#logon_type ⇒ :none, ...
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.
-
#multiple_instances ⇒ 0, ...
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.
-
#name ⇒ String
The name of the scheduled task without the path.
-
#password ⇒ String?
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.
-
#path ⇒ String?
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.
-
#priority ⇒ Integer?
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.
-
#restart_count ⇒ Integer?
The number of times that the Task Scheduler will attempt to restart the task.
-
#restart_interval ⇒ Object?
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).
-
#run_level ⇒ :limited, ...
The level of user rights used to run the task.,If not specified the task will be created with limited rights.
-
#run_only_if_idle ⇒ Symbol?
Whether the task will run the task only if the computer is in an idle state.
-
#run_only_if_network_available ⇒ Symbol?
Whether the task will run only when a network is available.
-
#source ⇒ Object?
The source of the task.
-
#start_when_available ⇒ Symbol?
Whether the task can start at any time after its scheduled time has passed.
-
#state ⇒ :absent, ...
When C(state=present) will ensure the task exists.,When C(state=absent) will ensure the task does not exist.
-
#stop_if_going_on_batteries ⇒ Symbol?
Whether the task will be stopped if the computer begins to run on battery power.
-
#triggers ⇒ Array<String>, ...
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.
-
#update_password ⇒ :yes, ...
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.
-
#username ⇒ String?
The user to run the scheduled task as.,Will default to the current user under an interactive token if not specified during creation.
-
#version ⇒ Object?
The version number of the task.
-
#wake_to_run ⇒ Symbol?
Whether the task will wake the computer when it is time to run the task.
Methods inherited from Base
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
#actions ⇒ Array<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.
24 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 24 attribute :actions |
#allow_demand_start ⇒ Symbol?
Returns 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_terminate ⇒ Symbol?
Returns 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 |
#author ⇒ Object?
Returns The author of the task.
58 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 58 attribute :author |
#compatibility ⇒ 0, ...
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.
82 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 82 attribute :compatibility |
#date ⇒ Object?
Returns 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_after ⇒ Object?
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).
86 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 86 attribute :delete_expired_task_after |
#description ⇒ String?
Returns 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_batteries ⇒ Symbol?
Returns 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_name ⇒ Object?
Returns 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 |
#enabled ⇒ Symbol?
Returns 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_limit ⇒ Object?
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).
97 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 97 attribute :execution_time_limit |
#group ⇒ Object?
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).
35 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 35 attribute :group |
#hidden ⇒ Symbol?
Returns 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.
38 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 38 attribute :logon_type |
#multiple_instances ⇒ 0, ...
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.
104 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 104 attribute :multiple_instances |
#name ⇒ String
Returns 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 |
#password ⇒ String?
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.
50 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 50 attribute :password |
#path ⇒ String?
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.
16 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 16 attribute :path |
#priority ⇒ Integer?
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.
108 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 108 attribute :priority |
#restart_count ⇒ Integer?
Returns 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_interval ⇒ Object?
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).
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.
42 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 42 attribute :run_level |
#run_only_if_idle ⇒ Symbol?
Returns 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_available ⇒ Symbol?
Returns 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 |
#source ⇒ Object?
Returns The source of the task.
68 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 68 attribute :source |
#start_when_available ⇒ Symbol?
Returns 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.
20 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 20 attribute :state |
#stop_if_going_on_batteries ⇒ Symbol?
Returns 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 |
#triggers ⇒ Array<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.
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.
54 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 54 attribute :update_password |
#username ⇒ String?
Returns 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 |
#version ⇒ Object?
Returns The version number of the task.
71 |
# File 'lib/ansible/ruby/modules/generated/windows/win_scheduled_task.rb', line 71 attribute :version |
#wake_to_run ⇒ Symbol?
Returns 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 |