Scheduled job should be trigger Every Month first Monday

Mani60
Tera Contributor

Hi,

I have one requirement, in that scheduled job should be trigger  first Monday of every month. I have tried but in that way its not working please find the attach snapshot. could you please suggest me proper way.

1 ACCEPTED SOLUTION

Musab Rasheed
Kilo Patron

Hi @ Manish G ,

Try below.? See the yellow lines in screenshot. Don't forgot to mark my answer as correct if that helps.

Condition Script:

answer = (new GlideDateTime().getDayOfMonthLocalTime() <= 7);

Screenshot:

find_real_file.png

View solution in original post

7 REPLIES 7

Martin Ivanov
Giga Sage

Hi. Please refer to this article. https://community.servicenow.com/community?id=community_question&sys_id=033f4be1dbdcdbc01dcaf3231f961935

 

Please Mark Correct And Helpful. Thanks!

SumanthDosapati
Mega Sage

Hi @ Manish G 

 

You can try 

"new Date().getDay() == 1 && new Date().getDate() <=7"

 

Mark as correct or helpful if it does.

Regards,

Sumanth

Musab Rasheed
Kilo Patron

Hi @ Manish G ,

Try below.? See the yellow lines in screenshot. Don't forgot to mark my answer as correct if that helps.

Condition Script:

answer = (new GlideDateTime().getDayOfMonthLocalTime() <= 7);

Screenshot:

find_real_file.png

Martin Ivanov
Giga Sage

Musab Sumanth, proposing a solution that is already proposed does not make any sense.