Run On-Demand Agent Job Discovery
Microsoft.SQLServer.Windows.Task.Agent.TriggerOnDemandAgentJobDiscovery (Task)
This task allows you to run on-demand Agent Job discovery on a selected SQL Server Agent on Windows. Note that before running this task, make sure that Agent Job discovery is enabled.
Element properties: Member Modules:
Source Code: <Task ID="Microsoft.SQLServer.Windows.Task.Agent.TriggerOnDemandAgentJobDiscovery" Target="Microsoft.SQLServer.Windows.Agent" Accessibility="Internal" Enabled="true" Remotable="false">
<Category>Maintenance</Category>
<WriteAction ID="WA" TypeID="Microsoft.SQLServer.Windows.WriteAction.OnDemandDiscoveryTrigger" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Task">
<ManagementGroupId>$Target/ManagementGroup/Id$</ManagementGroupId>
<DiscoveryId>$MPElement[Name='Microsoft.SQLServer.Windows.Discovery.AgentJob']$</DiscoveryId>
<TargetInstanceId>$Target/Id$</TargetInstanceId>
<TaskTimeoutSeconds>300</TaskTimeoutSeconds>
</WriteAction>
</Task>