- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 11:21 PM
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.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:09 AM
Hi
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:
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:06 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:07 AM
Hi
You can try
"new Date().getDay() == 1 && new Date().getDate() <=7"
Mark as correct or helpful if it does.
Regards,
Sumanth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:09 AM
Hi
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:
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 12:25 AM