Azure documentation states:
You can also set the timeout for each task individually - see task control options.
Yet, my task still times out despite me following the syntax and using self-hosted agent. Here is my Pipeline:
trigger: none
pool:
name: 'DevOps-Agent2-VM'
steps:
- checkout: none
- task: PowerShell@2
timeoutInMinutes: 5760
inputs:
targetType: 'inline'
script: |
Write-Host Starting writing log file
$PathLogFiles = "C:\Logs"
$DayFileNameLog = Get-Date -Format yyyyMMddHHmmss
$NewFolderName = Get-Date -Format yyyyMMddHHmmss
$PathLogFileFull = "$PathLogFiles\PSRemotingLogs-$DayFileNameLog.log"
Start-Transcript -Path "$PathLogFileFull" -Append
$Timer = New-Timespan -Hours 96
$Clock = [diagnostics.stopwatch]::StartNew()
While ($clock.elapsed -lt $timer){
Get-Date
Start-Sleep -Seconds 600
}
Write-Host Timer end
Write-Host Stopping writing log file
Stop-Transcript