Issue
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?
Solution
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
Answered By - merilstack
Answer Checked By - Willingham (JavaFixing Volunteer)