Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Jenkins schedule builds using different time zones?

Tags:

jenkins

In some versions of crontab you can set the time zone for when the job should run like:

TZ=GMT
30 11 * * *     

This would run at 11:30am GMT every day, even if the server was in some other time zone.

Even though Jenkins scheduling is based on cron, it doesn't seem to have this specific syntax. Is there some other way to do this in Jenkins?

Thanks

like image 264
Michael Avatar asked Mar 30 '12 18:03

Michael


2 Answers

As Michael mentioned in his answer, this functionality was added. Here's an example:

TZ=Europe/Kiev
0 1 * * 5

That would run at 1:00 AM Ukraine time, once a week on Friday.

To get the names of time zones to use, you can use the column marked "TZ database name" in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

like image 69
twasbrillig Avatar answered Sep 30 '22 00:09

twasbrillig


Looks like they added this in 2.60.2.

like image 37
Michael Avatar answered Sep 29 '22 23:09

Michael