Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Is there a way to run schedule job on completion of a transform map ?

RudhraKAM
Tera Guru

Hello 

we have a scheduled job, we need to run on the finish of the transform map, can we do that ? if yes can you please share how to do that ?

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hi,

Sure. You can use an onComplete transform script, for example, to trigger a scheduled job. Script example can be reviewed from this thread: https://community.servicenow.com/community?id=community_question&sys_id=1cf8b35fdb7e9bc05ed4a851ca96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

4 REPLIES 4

Allen Andreas
Tera Patron

Hi,

Sure. You can use an onComplete transform script, for example, to trigger a scheduled job. Script example can be reviewed from this thread: https://community.servicenow.com/community?id=community_question&sys_id=1cf8b35fdb7e9bc05ed4a851ca96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Saurav11
Kilo Patron
Kilo Patron

Hello Rudra,

Write the below in the onComplete transform script

var schImp_GR = new GlideRecord('sysauto');
schImp_GR.addQuery('name','<name>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this is for global scope
}

Hope this helps. Please mark the answer as correct/helpful based on impact.

 

Thanks.

Which is what I said above and the exact script that is in the link that I've already posted that you copied and put here.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Saurav11
Kilo Patron
Kilo Patron

Yeah, Please mark Allen's answer as the correct/helpful one if applied.

Thanks.