The CreatorCon Call for Content is officially open! Get started here.

Script not working in scheduled reports

Sireesha7
Tera Contributor

Hi Team,

 

Good Day !

 

I wrote a script in Scheduled report and it's not working and when I run same script in background script it's working fine.

 

The scenario is a scheduled report that is supposed to run on the second Monday of each quarter . However, it is incorrectly triggering on the first Monday of every week. 

 

I am attaching the script and background script executions as well.

Please check and do the needful !

 

image (9).pngimage (10).png

 

 

Thanks & Regards,

Sai Sireesha G

 

20 REPLIES 20

Ankur Bawiskar
Tera Patron
Tera Patron

@Sireesha7 

so when you wrote this script in scheduled report, where did you write it?

In condition field or script field itself?

Did you add logs and see there?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Please find the below screenshot for your reference.

 

image11.png

 

Regards,

Sireesha 

@Sireesha7 

did you add logs there and see what came?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

Yes I have added the logs and I am getting below error.

 

Evaluator.evaluateString() problem: java.lang.SecurityException: Illegal access to method getMonth() in class com.glide.glideobject.GlideDateTime:   org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:186)

 

 Regards,

Sireesha