Script not working in scheduled reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 10:27 PM - edited 06-04-2025 10:30 PM
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 !
Thanks & Regards,
Sai Sireesha G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 10:38 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 11:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 11:33 PM
did you add logs there and see what came?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 12:16 AM
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