imrichardcole
imrichardcole

Reputation: 4675

Time based build scheduling in Teamcity

In Teamcity (version 7.1) how do I set up a build to be triggered to run every 20 mins for example?

I notice you can set up timed based schedules, for example "Run this build at 18:00 everyday" but that's not quite what I want.

Upvotes: 3

Views: 10896

Answers (6)

Nagaraj
Nagaraj

Reputation: 73

Use this corn expression, 0 0/20 0/1 * * ? *, and check the trigger rule and branch filter.

Upvotes: 0

Pavel Kotov
Pavel Kotov

Reputation: 1

run every half hour
Hours set "*" - run every hour
Minutes set "0,30" - run every 0 minute and 30 minute

1

Upvotes: 0

Josh
Josh

Reputation: 2222

See these cron expression examples

The the cron expression here:

Under the Build Configuration Settings

Triggers > "Add new trigger" > "Schedule Trigger"

Select "advanced (cron expression) from the "When:" dropdown

This is for TeamCity version: 2017.1.2

screenshot

Upvotes: 1

neontapir
neontapir

Reputation: 4736

You can use a Schedule trigger with cron expressions to do this.

I believe you'd need this one:

  • Seconds: 0
  • Minutes: 0,20,40
  • Hours: *
  • Day of month: *
  • Month: *
  • Day of week: ?
  • Year: *

(or whatever interval you desire)

TeamCity uses Quartz for scheduling, see more cron expression examples.

Upvotes: 11

James Woolfenden
James Woolfenden

Reputation: 6661

The cron expression you need is "0 0/20 * * * ? *"

Upvotes: 1

Paul Hunt
Paul Hunt

Reputation: 3555

You can trigger builds using HTTP and so you could do what you are asking for by making such requests using your operating systems task scheduler.

http://confluence.jetbrains.com/display/TCD7/Accessing+Server+by+HTTP

Upvotes: -1

Related Questions