What happens when calling a URL like /sys.scripts.do?action=run_module&sys_id=<SYS_ID> ?

Aaron Munoz
Tera Guru

On a Knowledge 19 lab for MetricBase, at one point I had to use the following link:

https://ccw0446a-113.lab.service-now.com/sys.scripts.do?action=run_module&sys_id=58a6604513255300178e7f176144b0f6

I don't quite get what happens in the background for a URL formatted like this.

1 ACCEPTED SOLUTION

Found it.  It is literally running a script that is defined in a module.  Create a module:

 

find_real_file.png

Get its sys_id, feed it into that parameter, and run it.  It will run the script that is in the arguments.

find_real_file.png

 

View solution in original post

5 REPLIES 5

Mike Allen
Mega Sage

sys.scripts.do is Scripts - Background in your UI.  It appears that it is calling a script and running it in the background scripts module.

Thank Mike,

Do you know where the script is define?

For example, in the URL I posted it has sys_id as a parameter. In what table is the record with that sys_id located?

I cannot find that specific sys_id, so it may have been something they had specifically for that lab.  Or, it could be a script we don't have access to, because when I put that url at the end of my PDI's address, it appears to be running something, as I get an execution time for it.  I am interested to find out exactly how it is used.

Found it.  It is literally running a script that is defined in a module.  Create a module:

 

find_real_file.png

Get its sys_id, feed it into that parameter, and run it.  It will run the script that is in the arguments.

find_real_file.png