skip to Main Content

Please help me to write a powershell script to get list of azure data factory triggers list and its scheduling time. Ex: TriggerName,Frequency,ScheduleTime
Tr_Copy_Data,Daily,13:30

Thank you in advance.

Get list of azure data factory triggers and it’s schedule time for

2

Answers


  1. Run this below script in your azure powershell.

    $resourceGroupName = "Your_resource_group"
    $dataFactoryName = "Your_data_factory_name"
    
    $triggers = Get-AzDataFactoryV2Trigger -ResourceGroupName $resourceGroupName -DataFactoryName $dataFactoryName
    
    $triggerInfo = @()
    
    foreach ($trigger in $triggers) {
        $triggerName = $trigger.Name
        $frequency = $triggers.Properties.Recurrence.Frequency
        $Interval = $trigger.Properties.Recurrence.Interval
        $Hours = $triggers.Properties.Recurrence.Schedule.Hours
        $Minutes = $triggers.Properties.Recurrence.Schedule.Minutes
    
        # Add the information to the array
        $triggerInfo += [PSCustomObject]@{
            TriggerName = $triggerName
            Frequency = $frequency
            Interval = $Interval
        Hours = $Hours
        Minutes = $Minutes
        }
    }
    
    $triggerInfo | Format-Table -AutoSize
    

    Below is the trigger scheduled every day at 10:30.

    enter image description here

    Output:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search