- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 01:10 AM
Hi All,
I need a small confirmation for the below requirement.
Actually, there is an event that should be triggered on last day of every month [as Number of days in a month is not same] at 00:00:00. For Eg. 28th Feb 2019 00:00:00 but not at 28th Feb 2019 23:59:59.
I have read in ServiceNow docs as follows:
So, I have set the scheduled time as follows:
Now I have a doubt whether this would run correctly on 28th Feb 2019 00:00:00 or any other month if the last day is not 31st.
Please confirm!
Regards,
Nani
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 07:42 PM
Yes, setting the run date to the 31st at 00:00:00 will run the job on the last day of every month at 00:00:00 only. Not at any other time during the day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 05:19 AM
In my experience ServiceNow does trigger the scheduled task on the last day, regardless of the actual number of days in the month, following the tip you pasted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 08:22 AM
Hi Ian,
Thanks for the reply.
I just want to know if this runs on last day of every month at 00:00:00 only! It should not run at any time other than 00:00:00 on every last day of month!
Regards,
Nani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 05:22 AM
Yes It will run on 30th,28th and 29th(if leap year) if you select 31. Scheduling an event for the 29th or 30th is not recommended by serviceNow.
Check below document from serviceNow.
Special cases in job schedules
Mark Correct if it solved your issue.
Regards,
Tushar Sharma
www.dxsherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 08:22 AM
Hi Tushar,
Thanks for the reply.
I just want to know if this runs on last day of every month at 00:00:00 only! It should not run at any time other than 00:00:00 on every last day of month!
Regards,
Nani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2018 06:27 AM
To put it right here, in case the link that Tushar responded with ever changes, here is the relevant portion: "
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 will not be executed in months (like February) which are shorter than those dates.
- If an event is scheduled for the 31st, it will be executed on the last day of the month, even if the month is shorter.