How do I detect when a build has been triggered by 'Scheduler'?
Is there a way, environment or system variable, with in an MSBuild project file that I can detect when a build is a scheduled build? There are a couple things I'd like to do inside MSBuild during a scheduled build vs. when a build is manually triggered.
Thanks for your time.
Dave
Please sign in to leave a comment.
It is possible if you install this plugin: http://www.jetbrains.net/confluence/display/TW/Groovy+plug
Then you should be able to add a system property to your build configuration, for example:
teamcity.triggeredBy = %build.triggeredBy%
Your build should receive "teamcity.triggeredBy" system property, and if build was triggered by scheduler, this property should contain text: "Scheduler"
Thanks, I'll give it a try.
It worked!
Thanks again.