I have requirement to set the Azure ADF trigger timeout for Long running jobs in ADF using PowerShell. If trigger activation exceeds a certain time defined in the script then script execution should be stopped.
I have requirement to set the Azure ADF trigger timeout for Long running jobs in ADF using PowerShell. If trigger activation exceeds a certain time defined in the script then script execution should be stopped.
Hello @Syedaman and welcome to Microsoft Q&A.
I am a little confused. Triggers are what start pipeline runs. I am not aware of triggers itself having timeouts.
- Pipeline activities can have timeouts.
- We can also track pipeline runs and cancel pipeline runs.
- We can also author a pipeline to stop on its own.
Almost anything that we can do in the UI can be done with Powershell.
@Syedaman are you still facing the issue? I haven't heard a response from you to my initial queries.
Thanks for Responding. please see the below Powershell script block.
$result = Start-AzureRmDataFactoryV2Trigger -ResourceGroupName $ResourceGroupName -DataFactoryName $DatafactoryName -name $TriggerName -force -ErrorAction SilentlyContinue
Is there a way to set a timeout for the above command. If it take more time to activate the trigger then the process should break.
I checked via get-help Start-AzureRmDataFactoryV2Trigger -full and the docs. No there is not an additional option for manual timeout, SyedAmanS-8793 .
You could put some script around the command to catch how long the command took to run. Or do something asynchronously.
However, unless there is network issues, changing the trigger state should not take much time at all. Do note that putting a trigger into a running state is different from starting a pipeline.
7 people are following this question.