question

Syedaman avatar image
0 Votes"
Syedaman asked MartinJaffer-MSFT answered

Is it possible to set ADF Trigger timeout for long running jobs using powershell

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.

azure-data-factory
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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.

0 Votes 0 ·

@Syedaman are you still facing the issue? I haven't heard a response from you to my initial queries.

0 Votes 0 ·

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.




0 Votes 0 ·

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.