Run Scheduled job script on every month on 31st and for february it should run on 28th or 29th
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 01:38 AM
How to Run Scheduled job script on every month on 31st and for February it should run on 28th or 29th. What script can I write in scheduled job condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 01:59 AM
just set the scheduled job to run on 31st or 30th
if the month has 30 days then it will run on 30th day
If the month has 28/29 days i.e. February then it will automatically run on last day
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 02:00 AM
Hi @Pratiksha Lang1 ,
Yes you can do it by selecting the scheduled to run on the 31st of the month. For more info you can refer below :-
End of the month schedules
Because months have different lengths, take care when scheduling jobs for the end of the month.
- Scheduling an event for the 29th or 30th is not recommended, because the scheduled job is executed in months (like February) which are shorter than those dates.
- If an event is scheduled for the 31st, it executes on the last day of the month, even if the month is shorter.
For example, something scheduled to run on the 31st of the month runs on February 28 or February 29 in a leap year.
If my response helps you to resolve the issue close the question by ✅Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.
Thanks,
Ankit