Title: Azure DevOps build pipeline unreliable triggering by schedule
Tags: azure-devops;azure-pipelines
Question: I run build pipelines in Azure DevOps to daily update a Dockerfile and rebuild a container image with updated dependencies. The purpose is to have an up-to-date version of a dependency for the project and release a new artifact in container registry.
In Azure DevOps I have three chained build pipelines. The first pipeline is triggered every day with scheduled trigger. The next two pipelines are triggered with CI trigger file path filters. This all works well, most of the times.
My problem is that sometimes the schedule is not smithchristopher@example.org. This happens after the pipelines have been running normally for days (ranging from about 1 to 15 days). The checkbox "Only schedule builds if the source or pipeline has changed" is unchecked, so having no commits should not be the problem.
Strange thing after this problem situation is that when I login to Azure DevOps portal the scheduled event is immediately triggered and I can see that the latest daily build starts running. I don't need to start it manually, it starts automatically like it would be scheduled but at the time I logged in.
This project is running with the free version of Azure DevOps. The project and pipelines have been created when Azure DevOps was VSTS and the same triggering problem was also in VSTS. Sometimes I run out of free quota and then I get an error that the agent cannot be started. This is not the case when the scheduled trigger is not running.
What could cause the problem in triggering by the schedule? Have any of you encountered this same problem? How could I debug or resolve this and get my builds running reliably? I cannot find any debug information about the trigger events, only logs from agent after the trigger has already happened. I have not yet recreated the pipelines to find out if "rebooting" helps in this case. That's my next step if no better answers will come up.

Here is the accepted answer: Update 07/11/2019:
​We have since updated this logic to give 1 full month of scheduled builds to continue to run without any user activity.
Nightly builds require someone to sign in daily.
From the docs:
My build didn't run. What happened?
Your Azure DevOps organization goes dormant five minutes after the last user signed out. After that, each of your build pipelines will run one more time. For example, while your organization is dormant:
A nightly build of code in your Azure DevOps organization will run only one night until someone signs in again.
CI builds of an external Git repo will stop running until someone signs in again.
https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=vsts&amp;tabs=yaml
Comment for this answer: Thanks Marc for pointing to this document. This can definitely be the reason. I have not found this "feature" documented before. The timing is not exactly as in document because it takes multiple days before the pipeline stops running after the login. With this account I do not login interactively frequently and this is the only account in the organization. It is also strange that another scheduled pipeline used for debugging the situation is successfully running every day even if the original pipeline does not trigger.
Comment for this answer: @Cocowalla Sorry, I don't know. But I suppose it also applies to scheduled releases.
Comment for this answer: This is a total PITA, and I have no idea why anyone would think this was a good idea - do you happen to know if it applies to scheduled Releases as well as Builds?


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:10/06/18', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<azure-devops><azure-pipelines>', 'Title': 'Azure DevOps build pipeline unreliable triggering by schedule', 'ViewCount': 4764, 'id': 52677708, 'user_AboutMe': '<p>I help people with cloud technology. You know: AI, cloud architecture, ML, BIG data, containers, Odoo, DevOps, Azure, python, node.js, quantum computing, AWS, Google Cloud, Alibaba Cloud, security and other hot cool stuff.</p>\n', 'user_AccountId': 2035925.0, 'user_DisplayName': 'Veikko', 'user_Reputation': 3079.0, 'user_Views': 350.0, 'user_id': 1818279.0}}