Triggers 编辑
Create triggers and associate tasks with them. When activated, the triggers start the associated tasks in the user environment. To view the tasks associated with a trigger, click the trigger to expand its row.
You can perform the following operations:
Create a trigger
Refresh the view
Edit a trigger
Clone a trigger
Manage associations
Delete a trigger
Tip:
You can quickly enable or disable a trigger by using the toggle in the State column.
There are two built-in triggers:
- Machine shutdown. Activated when machines shut down.
- Machine startup. Activated when machines start up.
Note:
- You cannot delete and edit built-in triggers.
- For an example of how to use startup and shutdown triggers, see Configure startup and shutdown triggers for scripted tasks.
Create a trigger
To create a trigger, perform the following steps:
In Triggers, click Create trigger.
Specify a name for the trigger.
Optionally, specify additional information to help you identify the trigger.
Choose whether to enable (Yes) or disable (No) the trigger.
Note:
If disabled, the agent does not evaluate and process the trigger.
Select a trigger type from the list and fill in the required information.
Scheduled
Windows event
Cloud Health Check result
Profile Management health check result
Custom scripted task result
Tip:
- The information varies depending on the trigger type that you select. For details, see Available trigger types.
- For an example of how to use Windows events as triggers, see Use Windows events as triggers to detect VDA registration issues.
In Summary, verify that you created the trigger as intended.
When you have finished, click Done to save and exit.
Available trigger types
The following trigger types are available for selection:
Scheduled. Schedules when to activate the trigger. The following options are available:
- Date and time. Specify when the trigger is activated.
- Repeat. Select Yes to specify how often the trigger is activated. For example, every one hour, every two hours, every day, every two days. If you select Week or Month, you can specify one or more specific days. Select No if you want the trigger to activate only once.
Windows event. Lets you define the criteria that Windows events must meet to activate the trigger. The following options are available:
Add criterion. Define the criteria that Windows events must meet to activate the trigger.
Interval. Specify an interval, in minutes, for the trigger. After being activated, the trigger will not be activated again until the specified interval elapses.
Note:
Only Windows classic event logs such as Application, System, or Security are supported.
Cloud Health Check result. Activates the trigger when Cloud Health Check returns a specified health status. The following options are available:
VDA health status. Use VDA health status to activate the trigger. VDAs can be in normal or unusual state, as shown in Home > Overview.
Task data. Select data to pass to associated tasks, and specify the parameters in those tasks to receive the data. If a parameter you specify here is the same as the one configured for associated tasks, the former takes precedence. We recommend using the default parameter names. Update your script files if necessary. You can specify the following data:
VDA health status (string). The health status that Cloud Health Check returns. Use the parameter in associated tasks to receive the status.
Health report (string). The VDA health check report that Cloud Health Check generates. Use the parameter in associated tasks to receive the full path of the report. For more information, see Heath check results.
Profile Management health check result. Activates the trigger when Profile Management health check returns a specified health status. The following options are available:
Profile Management health status. Use the following Profile Management health statuses to trigger associated tasks: Warning (suboptimal state of Profile Management) and Error (Profile Management configured incorrectly).
Task data. Select data to pass to associated tasks, and specify the parameters in those tasks to receive the data. If a parameter you specify here is the same as the one configured for associated tasks, the former takes precedence. We recommend using the default parameter names. Update your script files if necessary. You can specify the following data:
Profile Management health status (string). The health status that the Profile Management health check returns. Use the parameter in associated tasks to receive the status. For more information, see Administration.
Health report (string). The health check report that the Profile Management health check generates. Use the parameter in associated tasks to receive the full path of the report. For more information, see Reports.
Custom scripted task result. Activates the trigger when scripted tasks return specified results. You first specify custom scripted tasks and then define the criteria that the tasks must meet to activate the trigger. The following options are available:
Add criterion. Select one or more scripted tasks and then define the criteria that those tasks must meet to activate the trigger.
Task data. Select data to pass to associated tasks, and specify the parameters in those tasks to receive the data. If a parameter you specify here is the same as the one configured for associated tasks, the former takes precedence. We recommend using the default parameter names. Update your script files if necessary. You can specify the following data:
Task name (string). The name of the scripted task that triggers the associated task. Use the parameter in associated tasks to receive the name.
Exit code (integer). The exit code value that the scripted task returns. Use the parameter in associated tasks to receive the value.
Console output (string). The console output that the scripted task writes. Use the parameter in associated tasks to receive the full path of the output.
File output (string). The file output that the scripted task generates. Use the parameter in associated tasks to receive the full path of the output.
Edit a trigger
To edit a trigger, perform the following steps:
In Triggers, select the trigger.
Click Edit in the action bar.
Make changes as needed.
In Summary, verify that you made the changes as intended.
When you have finished, click Done to save and exit.
Clone a trigger
To clone a trigger, perform the following steps:
In Triggers, select the trigger.
Click Clone in the action bar.
Specify a name for the clone.
Optionally, specify additional information to help you identify the trigger.
Select a configuration set to clone the trigger to.
When you have finished, click Done to save and exit.
Manage associations
To manage associations for a trigger, perform the following steps:
In Triggers, select the trigger.
Click Manage associations in the action bar.
Select scripted tasks to associate them with the trigger or unselect scripted tasks to unassociate. If needed, use the search box to quickly search for a task.
Choose whether to show only triggers that apply to this task.
When you have finished, click Done to save and exit.
When managing associations, keep the following in mind:
- To prevent endless looping, WEM supports up to 10 triggering times in a single loop chain. The following is an example, in which Task A triggers Task B, Task B triggers Task C, …, and Task K triggers Task L. Task K fails to trigger Task L — the loop terminates because the triggering times in this single loop chain have exceeded 10.
Delete a trigger
To delete a trigger, perform the following steps:
In Triggers, select the trigger.
Click Delete in the action bar.
Note:
If you delete a trigger with which scripted tasks are associated, it will no longer trigger those tasks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论