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
Tera Sage
Tera Sage

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

Please hit like and mark my response as correct if that helps
Regards,
Musab

View solution in original post

7 REPLIES 7

Martin Ivanov
Giga Sage
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!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

SumanthDosapati
Mega Sage
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
Tera Sage
Tera Sage

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

Please hit like and mark my response as correct if that helps
Regards,
Musab

Martin Ivanov
Giga Sage
Giga Sage

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


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024