Ask a questionAsk a question
 

AnswerHow to configure CI Build which runs at every hour

  • Monday, November 02, 2009 11:20 AMnewindotnet Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    I have Created CI Build and it's working fine.
    Now, I want to run CI Build at every hour whether checkin happens or not.

    I tried to do with the trigger option but it's not working because I want to run CI Build at every hour.

    Can anybody suggest me that how can i achieve this ?

Answers

  • Monday, November 02, 2009 4:39 PMACKH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    If the build is not triggered by a checkin it is actually not a CI build. However, what you could do is create a build definition and set its trigger to "Check-ins do not trigger a new build". You can then use the Windows built in scheduler to trigger a build for that build definition every hour.

    You'd have to run something like this:

    "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\TFSBuild.exe" start <server> <team project> <build definition>

    if you have to pass arguments to the build you can use the /msBuildArguments switch.

    Create a batch file with that line and pass it to a Windows scheduler task. In the advanced properties you can repeat the task every hour.
    • Marked As Answer bynewindotnet Tuesday, November 03, 2009 3:18 AM
    •  

All Replies

  • Monday, November 02, 2009 12:40 PMEwald Hofman - Avanade Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Why do you want to build something that has no checkins?

    Anyway, what you want is something that is not available out of the box. Ideas I have, is to create an application yourself that is scheduled. That application either checks in a dummy file each hour, or you (and that is a cleaner solution) queues a new build every hour.

    In the latter solution, you just define in the trigger of the build, that it is manual. An example how to queue a build by code: http://www.woodwardweb.com/dotnet/tfs_build_api_b.html
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
  • Monday, November 02, 2009 4:39 PMACKH Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    If the build is not triggered by a checkin it is actually not a CI build. However, what you could do is create a build definition and set its trigger to "Check-ins do not trigger a new build". You can then use the Windows built in scheduler to trigger a build for that build definition every hour.

    You'd have to run something like this:

    "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\TFSBuild.exe" start <server> <team project> <build definition>

    if you have to pass arguments to the build you can use the /msBuildArguments switch.

    Create a batch file with that line and pass it to a Windows scheduler task. In the advanced properties you can repeat the task every hour.
    • Marked As Answer bynewindotnet Tuesday, November 03, 2009 3:18 AM
    •