Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

scheduled report on quarter basis

Community Alums
Not applicable

Hi,

I need to schedule a report on quarter basis. I set the run as monthly and in the conditional i used the below script but it was triggering every month. I see it report schedule for next month in schedule which it should not. Can anyone help how to resolve this issue.

 

var gdt = new GlideDateTime(); // for example this month is january,

 

      gs.print(gdt.getMonth()); // output will be : *** Script: 1

 

      if (gdt.getMonth() == 1 || gdt.getMonth() == 5 || gdt.getMonth() == 9 ) {

 

                  answer = true;

 

      }

 

5 REPLIES 5

No, for the same reason as I explained before.

You only could fake the new GlideDateTime() and insert there any other date, like new GlideDateTime('2024-08-01 12:00'). Then run the Schedule today and check whether it was executed or not.