<p>If you separate your tasks in to different jobs, each job has 60 min independently of the next job when running on a MS hosted agents and you can manually set a longer timeout if you use a self hosted agent for a job.</p>
<p>For example my automated tests take longer then 60 minutes so I use a timeoutInMinutes Property on the job of 360 minutes, I am using a self hosted agent so that is why I am not limited to the 60min, more details on agents <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&amp;tabs=browser</a></p>
<pre><code>- job: RunTests
    timeoutInMinutes: 360
    displayName: Automated tests Job
    variables:
    - group: eStrategyURLs      
    - name: Env
      value: 'UAT'
   ....
  steps:
      - checkout: QA-Automation
        path: s/$(qaTestCodeRepoName)

      - template: '..\SharedResources\CypressTests.Template.yml'
        parameters:
          emailList: $(Build.RequestedForEmail)
...
</code></pre>

CC BY-SA 4.0
2022-09-13T11:09:50.437Z
2022-09-13T13:33:37.873Z
2022-09-13T13:33:37.873Z
qBasicBoy
<p>Azure Devops has a 60 minutes max execution time for pipelines but sometimes my deployment takes much more than this, the pipeline time out and, since is a time out, no further tasks are run in the pipeline, even the ones that send email/message about the error on the pipeline.
I cannot change the timeout (budget issue).</p>
<p>I am thinking in start the deployment process (is async), finishing the pipeline with a status other than `` <code>success</code>, and using a trigger (I can create a trigger on the system I am deploying to do something when the deploy finish) to call the Azure DevOps API and change the status of the pipeline to success/failed and/or start another pipeline to run the post-deploy steps.</p>
<p>Is this overenginering? Is there a better way to solve this problem?</p>

<azure-devops><cicd>
Azure Devops solution for max excution time
Joao  Vitorino
# Azure Devops solution for max excution time

(Asked by: username_0 on 2022-09-09)

Azure Devops has a 60 minutes max execution time for pipelines but sometimes my deployment takes much more than this, the pipeline time out and, since is a time out, no further tasks are run in the pipeline, even the ones that send email/message about the error on the pipeline.
I cannot change the timeout (budget issue).

I am thinking in start the deployment process (is async), finishing the pipeline with a status other than `` `success`, and using a trigger (I can create a trigger on the system I am deploying to do something when the deploy finish) to call the Azure DevOps API and change the status of the pipeline to success/failed and/or start another pipeline to run the post-deploy steps.

Is this overenginering? Is there a better way to solve this problem?

**Tags:** azure-devops, cicd


---

## 1 answers

### Answer by username_1 on 2022-09-13. Score: 3

If you separate your tasks in to different jobs, each job has 60 min independently of the next job when running on a MS hosted agents and you can manually set a longer timeout if you use a self hosted agent for a job.
For example my automated tests take longer then 60 minutes so I use a timeoutInMinutes Property on the job of 360 minutes, I am using a self hosted agent so that is why I am not limited to the 60min, more details on agents https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser
- job: RunTests
    timeoutInMinutes: 360
    displayName: Automated tests Job
    variables:
    - group: eStrategyURLs      
    - name: Env
      value: 'UAT'
   ....
  steps:
      - checkout: QA-Automation
        path: s/$(qaTestCodeRepoName)

      - template: '..\SharedResources\CypressTests.Template.yml'
        parameters:
          emailList: $(Build.RequestedForEmail)
...


---

