Schedule Jobs : Cron Expressions

Dear community

I’m trying to schedule a job on first and second Monday of every month.

What would be the cron expression? Tried with :

  1. 0 0 15 ? 1/1 MON#1,MON#2 *
    
  2. 0 0 15 ? 1/1 MON#1,2 *
    

The result I am getting is :

  1. Monday, October 1, 2018 3:00 PM
  2. Monday, November 5, 2018 3:00 PM
  3. Monday, December 3, 2018 3:00 PM
  4. Monday, January 7, 2019 3:00 PM
  5. Monday, February 4, 2019 3:00 PM

I am not getting the second Monday of the month.
Please suggest some solution.

Regards,
Akansha

Hi @Akansha, I think you can’t do it in one expression. How bout splitting it to two schedules?

One for First Monday of the Month.
0 0 15 ? 1/1 MON#1

Second for Second Monday of the Month.
0 0 15 ? 1/1 MON#2

Hope this helps. :slight_smile:

2 Likes

Hello @quihan,Thanks for your reply… I tried for two schedules in orchestrator… But it is not allowing to create one more process with another environment.

Hi @Akansha, what is the error there?

Cheers.