Run scheduled job on specific node

tommyjensen
Giga Expert

I am using the sample code

var rec = new GlideRecord('scheduled_import_set');

rec.get('name', 'YOUR_JOB_NAME_HERE');

SncTriggerSynchronizer.executeNow(rec);

to run an inactive scheduled job from a Workflow. I know that if the job was run normally via the scheduler it is possible to target the job to run on a specific node by specifying System Id on the Scheduled Job Item record.

But how can I do this if I run the job via a script call?

1 ACCEPTED SOLUTION

Hi Tommy,



My assumption was, You would create a sys_trigger entry through code by setting the above code as script in it.



Thanks


Srini


View solution in original post

4 REPLIES 4

srinivasthelu
Tera Guru

Hi Tommy,



I believe System will still honor the Node Id on the Schedule record, even if you fire it from script.



Thanks


Srini


But the system id field is only on the scheduled item not on the schedule job record and in this case there is no scheduled item record.


Hi Tommy,



My assumption was, You would create a sys_trigger entry through code by setting the above code as script in it.



Thanks


Srini