Cron Expression For Biweekly Tuesday At 12PM

Hi Team,

Need a Cron Expression For Biweekly Tuesday At 12PM.

Please help me if you were aware of it !!

Thanks,
Rishi

Hi @Putta_Sri_Sai_Rishik_Chow

0 12 * * 2/2

Hi,
you can use below expression

0 0 12 ? * 2#1,2#2

  • 0: Seconds (0)
  • 0: Minutes (0)
  • 12: Hour (12)
  • ?: Day of the month (don’t specify a specific day)
  • *: Month (every month)
  • 2#1,2#2: Day of the week (Tuesday), and #1 and #3 indicate the first and third occurrence of that day in the month, making it biweekly.

Hi @Putta_Sri_Sai_Rishik_Chow

0 12 * * 2

Hi @pravallikapaluri @vrdabberu

0 12 * * 2/2 - Showing Invalid Cron Expression

@Putta_Sri_Sai_Rishik_Chow

Invalid cron expression :frowning:

Hi @Putta_Sri_Sai_Rishik_Chow

try the below cron

0 0 12 ? * TUE/2 *

Regards

No… It’s showing At 12:00 PM, every 2 days of the week, Tuesday through Saturday

@Putta_Sri_Sai_Rishik_Chow

0 0 12 ? * 2/2

@Putta_Sri_Sai_Rishik_Chow

Check on the below thread

Hope this helps!!

Hi @Putta_Sri_Sai_Rishik_Chow

If you want to run the bot in 1st week of Tuesday and 3rd week of Tuesday at 12:00 PM, use the below one,

0 12 * * 2#1,2#3

If you want to run the bot in 2nd week of Tuesday and 4th week of Tuesday at 12:00 PM, use the below one,

0 12 * * 2#2,2#4

Hope it helps!!

Hi @Putta_Sri_Sai_Rishik_Chow

Use below Cron Expression

0 0 12 ? * TUE/2

Hope it will helps you :slight_smile:
Cheers!!

Hi @Putta_Sri_Sai_Rishik_Chow,

I don’t think there is a direct way to do this, at least not a non-complex direct way.

You can use multiple cronjobs:
1st Tuesday: 0 0 0,12 ? * 3#1 *
3rd Tuesday: 0 0 0,12 ? * 3#3 *
5th Tuesday: 0 0 0,12 ? * 3#5 *

You will need to create three triggers.

Run them on Free Online Cron Expression Generator and Describer - FreeFormatter.com, should work as they are.

Another (complex) logic could be to add 14 (13?) days (or convert to minutes) from the first Tuesday.

Hope this works for you!