Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Feature Request - Deploy - Add Condition to test for running/not running Process

It would be nice if there was an option to test for a process that is running or not running in a step.

1

Comments

1 comment
Date Votes
  • Hey, thanks for the suggestion! We'll note that internally.

    In the mean time, you can accomplish this with a command or PowerShell step!

    This Example will stop a package from continuing if it finds the named process, chrome in this case. I have 11 as a success code, and if the script doesn't find the named process it exits with 11 and the package continues as successful.

    Stop if Process Found Running

    $Processes = Get-Process
    if ( $Processes.ProcessName -contains "chrome" ) {
        Write-Output "Process Found - stopping"
        Exit 22
    } Else {
        Write-Output "Process Not Found"
        Exit 11
    }
    
    0