How to call "Script include" asynchronously from Scheduled job?

Nivetha K1
Kilo Contributor

Hi All,

I have a OOB script include named "ScriptedProgressWorker" which will call the below given script include asynchronously which in turn getting called from scheduled job. For eg. In scheduled job "Transform Info", I've defined like "new ScriptedProgressWorker.startAsync("InfoTransform");"

When I try to execute this scheduled job "Tranform Info", it is not doing anything. So, I checked by giving few log statements in "InfoTransform" script include just to understand whether this script include is getting called or not. I found that this script is not getting called at all. 

Then, I've removed the asynchronous call and just gave "new InfoTransform().getCi();" in scheduled job and executed it. Now, the job is working fine and doing the functionality defined in it.

But, I should write something in "InfoTransform" script include for getting it called asynchronously because I've removed the previous one which is not working.

Can anyone tell me how to make this script include as asynchronous just to prevail the older functionality?

Any insights provided would be much helpful.

 

1 ACCEPTED SOLUTION

Ash10Patil
Kilo Guru

Hi,

 

If you want to call script include function asynchronously,

- Create an event

- Create script action which gets called when event is triggered. Add script include function call in script action.

- trigger event from scheduled job

 

Thanks.

View solution in original post

2 REPLIES 2

Ash10Patil
Kilo Guru

Hi,

 

If you want to call script include function asynchronously,

- Create an event

- Create script action which gets called when event is triggered. Add script include function call in script action.

- trigger event from scheduled job

 

Thanks.

Thanks Asha for your input !