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

3 comments
Comment actions Permalink

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"

0
Comment actions Permalink

Thanks, I'll give it a try.

0
Comment actions Permalink

It worked!

Thanks again.

0

Please sign in to leave a comment.