I could observe that my Self-Hosted Agent (Agent.Version = 2.144.2
) gain different results when a buildpipeline triggered manually or sheduled.
1. failed observation (Schedule nightly build at 3 am)
2. failed observation (Schedule nightly build at 3 am)
successful observation (Manual Build)
Sadly, I could also observer Schedule nightly builds with the same tasks that runs totally fine.
The Error
The sheduled builds failed cause the agent reached the maximum execution time of 1 hour. The reason is that the devenv.ps1 task need much longer that it usually does.
The Task: devenv.ps1
is a selfmade task and without knowing the details about this task, it is not possible to say what's going on here. It is a custom task based on a powershell script to perform a git clean
, nuget restore
, some individual prebuild events
and finally a devenv rebuild
.
In the logs I can't find a hint for this behavior.
The Question
Are there any reasons why a Manual task could have a different behavior as a Schedule task? Did anybody observe a similar behavior?
Edit #1
I switched from the custom devenv task to the offical Visual Studio-Build task. Unfortunately, the results do not change:
==============================================================================
Task : Visual Studio-Build
Description : Erstellen Sie den Build mit MSBuild, und legen Sie die Visual Studio-Versionseigenschaft fest.
Version : 1.151.2
Author : Microsoft Corporation
Help : [Weitere Informationen](https://go.microsoft.com/fwlink/?LinkID=613727)
==============================================================================
Also the 2 hours timeout was not enought in this build.
Edit #2
I setup a test series and now I could say: it seems that the first sheduled build of a day run into a timeout. Only why is unclear.
The screenshot shows a series of shedueld builds. The source and the tasks are the same for all builds.
1. 10:00 AM -> Timeout
2. 00:55 AM (Next Day)
3. 03:00 AM
4. 05:05 AM
I make similar observations before, but this one I could put perfectly in one screenshot. How is this possible?