1

I have two jobs, p1 and p2.

Conditions that trigger p2:

  1. p1 build is completed

  2. Every Monday

enter image description here

But I know "Build after other projects are built" and "Build periodically" do not trigger at the same time. Is there any way to solve this?

Taazar
  • 1,545
  • 18
  • 27
Hsiao-I Yang
  • 65
  • 2
  • 10

1 Answers1

0

Yes: Make a job p3 than just triggers job p2 when p1 is completed. And schedule p2 to run periodically.

cghislai
  • 1,751
  • 15
  • 29
  • But when I buid p1, even if p2 is set to "Build periodically", it will still be triggered – Hsiao-I Yang Feb 15 '20 at 02:15
  • i dont understand, and now i think I might have not understood your question correctly – cghislai Feb 15 '20 at 02:18
  • I express it differently. if "p1 build sucess" && "today is Monday" trigger "p2" else p2 does nothing Thank you for your help > – Hsiao-I Yang Feb 15 '20 at 02:24
  • ok. You can use conditional step in your job to check on the weekday. Basically you can do the kind of logic you describe in that build step. – cghislai Feb 15 '20 at 02:29