- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 01-21-2020 01:48 AM
I thought I'd share with you a handy script which is easily adapted to meet yours or your end users needs when it comes to sending scheduled reports.
In my past experience and I've been guilty of this is if someone requests a daily report which also gets sent out on non working days, people query but inevitably live with it... Or if you're dedicated you have 5 or so scheduled entries set up for different days.
If you use the below script you can control the days of the week it gets sent out (9am is just an example)
function checkWeekday(){
var today = new GlideDateTime();
var dayOfWeek = today.getDayOfWeek();
var answer = false;
if(dayOfWeek == 1 || dayOfWeek == 2 || dayOfWeek == 3 || dayOfWeek == 4 || dayOfWeek == 5){
//1 - Monday 2 - Tuesday 3 - Wednesday etc... etc...
answer = true;
}
return answer;
}
checkWeekday();
So for example an example if an end user needs a report Monday, Wednesday and Friday this would be 1, 3 and 5.
- 1,740 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Community Alums This script is not working we are still getting the Scheduled reports , is there is any other things we need to configure, we have only check the conditional checkbox and script