Execute Now button is not executing the code of scheduled job

kamlesh kjmar
Mega Sage
Mega Sage

Hi,

I have written a scheduled job to execute daily at 6 am. After writing the code when I saved it and clicked on execute now button, page refreshes but it do not do anything i.e. script do not executes.

But when I copy the same code and executes it from Background script it works perfectly fine. Any idea why is that ?

 

12 REPLIES 12

Please apply cross scope privileges between both your scoped app tables.

https://docs.servicenow.com/bundle/kingston-application-development/page/build/applications/reference/c_CrossScopePrivilegeRecord.html

 

Regards,

Sachin

Matthew Smith
Kilo Sage

Hi Kamlesh

Type sys_trigger.list into the Filter Navigator and sort the records by created. This should tell you if the Scheduled Job is triggered or not.

If yes, then there must be an issue with the script.

Thanks

Matt

Hi Matt,

I checked that as well. Scheduled job didn't execute at all. Is it because my schedule job is in different application i.e. not global. If yes then is this behavior expected ?

 

Thanks,

Kamlesh

Yes that is possible if global application scope does not have access to edit the records in your scoped app,

Amarjeet Pal
Kilo Sage
Kilo Sage

Hello Kamlesh,

 

Did you figured solution for this.

 

Thanks,

Amarjeet Pal