Scheduled Script execution

LJ_23
Tera Contributor

Hello everyone I am trying to create a scheduled job: 

A scheduled job should run and check the end date within the Forescout Pen Test table.

If the end date has passed, the job should set the records to Disposed.

 

this is my script: 

LJ_23_1-1764080634759.png

 

But the status is not updating to disposed?

LJ_23_0-1764080585623.png

 

12 REPLIES 12

@LJ_23 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

no I tried your options and this still has not worked

Oliver Stammler
Tera Guru

Hey @LJ_23 ,

even though your question has already been answered I just wanted to add one thing real quick.
You should not name your variable "gr" - instead use a "speaking" name to describe what it is as f.e. "grPenTest"

See also this ServiceNow Knowledge Article about this topic: Best Practice: Why using 'gr' as a GlideRecord variable name in custom scripts is always a bad idea

 

Cheers
Oli