Schedule report on first monday of every month

SKR
Giga Contributor

Hi,

 

I am trying to schedule a report that needs to be sent on first Monday of every month and I have used a below query, Can someone hep me understand whats wrong in the query.

function checkmonday() {
var gdt = new GlideDateTime();
var day = gdt.getDayOfWeek();
var result = false;
if (day == 1 && gdt.getDayOfMonth()<=7){
result = true;
}
return result;
}
checkmonday();

 

and I have schedule as follow:

 

RUN: Weekly

Day: Monday

Time : 8:00 AM

 

 

9 REPLIES 9

Jaspal Singh
Mega Patron
Mega Patron

Script seems fine.What is the issue?

SKR
Giga Contributor

User is not getting the reports on first Monday of every month

Brian Lancaster
Tera Sage

When do they get it? Are they not getting it at all?

they are not getting at all