- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 06:35 PM
Hi.
I want to create a feature to email reports on the 1st and 3rd Mondays 00:00, but I don't know how.
Help me!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 07:13 PM
Hi d-aizawa,
In the Scheduled Reports ("Reports" > "Scheduled Reports"), check the "Conditional" checkbox.
In the Condition, enter the following script:
var gdt = new GlideDateTime();
var dayOfWeek = gdt.getDayOfWeekLocalTime();
var dayOfMonth = gdt.getDayOfMonthLocalTime();
var weekOfMonth = Math.ceil(dayOfMonth/7);
gs.info(dayOfWeek);
gs.info(weekOfMonth);
var answer = false;
if (weekOfMonth == 1 || weekOfMonth == 3 && dayOfWeek == 1) {
answer = true;
}
answer;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 07:13 PM
Hi d-aizawa,
In the Scheduled Reports ("Reports" > "Scheduled Reports"), check the "Conditional" checkbox.
In the Condition, enter the following script:
var gdt = new GlideDateTime();
var dayOfWeek = gdt.getDayOfWeekLocalTime();
var dayOfMonth = gdt.getDayOfMonthLocalTime();
var weekOfMonth = Math.ceil(dayOfMonth/7);
gs.info(dayOfWeek);
gs.info(weekOfMonth);
var answer = false;
if (weekOfMonth == 1 || weekOfMonth == 3 && dayOfWeek == 1) {
answer = true;
}
answer;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2022 07:14 PM
