Jenkins pipeline with multiple triggers not triggering correctly

Viewed 33

I have a jenkins pipleine which has two triggers one for pollSCM and the other is a cron job to run every Tuesday and Thursday at 6 pm EST. I configured it as follows

triggers {
        pollSCM('H/5 * * * *')
        cron('00 18 * * 2,4')
    }

I followed the document here to set up the trigger. The pollSCM trigger works correctly. But the cron trigger, instead of triggering the build at 6 pm EST. Its trigerring at 2 pm EST. Why is this happening?

Jenkins image

1 Answers

Adding TZ (timezone) in Build periodically under Build Triggers, helped to trigger the pipeline at 6 pm EST on Tuesday and Thursday.

TZ=America/New_York
00 18 * * 2,4

enter image description here

Related