- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2025 09:06 AM
I have an approval reminder notification that is to be sent out on Mondays at 8AM and Thursdays at 8AM. Unfortunately, when I try to schedule a flow trigger or a scheduled job, I only have options such as Daily, Weekly (which does not allow multiple days), Periodically (which doesn't allow exact days), or Monthly.
Is it possible to configure this notification on one scheduled job or one flow? I would like to avoid creating two separate jobs or flows for this same action. I just need to be able to schedule it for two days a week at the same time, but I know if this can be achieved. If it is possible, can someone please help me out?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2025 10:06 AM - edited ‎03-18-2025 10:08 AM
you will require 1 scheduled job which runs daily at 8AM
In the condition field check if it's Monday or Thursday, if yes then run the job script
Adjust the script based on which day is configured as start day of week
glide.ui.date_picker.first_day_of_week
Setting Monday as the first day of the week in the calendar
answer = false;
var today = new GlideDateTime();
var dayOfWeek = today.getDayOfWeek(); // 1 = Sunday, 2 = Monday, ..., 7 = Saturday
if (dayOfWeek == 2 || dayOfWeek == 5) { // 2 = Monday, 5 = Thursday
answer = true;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-18-2025 09:53 AM
You are right, the way I get around this on ServiceNow is to run a script like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2025 10:02 AM
@Joe Wong where are you inserting this script? In the conditional script section of the scheduled job or did you create a script include and call the script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2025 10:06 AM - edited ‎03-18-2025 10:08 AM
you will require 1 scheduled job which runs daily at 8AM
In the condition field check if it's Monday or Thursday, if yes then run the job script
Adjust the script based on which day is configured as start day of week
glide.ui.date_picker.first_day_of_week
Setting Monday as the first day of the week in the calendar
answer = false;
var today = new GlideDateTime();
var dayOfWeek = today.getDayOfWeek(); // 1 = Sunday, 2 = Monday, ..., 7 = Saturday
if (dayOfWeek == 2 || dayOfWeek == 5) { // 2 = Monday, 5 = Thursday
answer = true;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-18-2025 08:12 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader