Scoped app custom scheduled job definition

PatrickL
Giga Guru

Hi,

 

Looking for some insights.

 

I have a requirement which needs an own scheduled job definition. Kinda similar to 'scheduled export sets'

How to approach this, if it is even possible.

 

So I initially thought.. Let's extend sysauto. This would then give me all of the functionality ootb.. Wrong.. as it seems

 

So extending is fine. However the creation of the sys_trigger record is not working. Probably because of the BR on sysauto which calls SncTriggerSynchronizer to maintain the trigger record.

 

So I gueass the first question would be, if it was ever intended to be extended / used in a scoped app.

For example there is a Servicenow definition, in a non global scope (Benchmark Client) so one would think it should be possible..

 

So first road block to overcome..

 

Let's say we can overcome that one.. How would you trigger certain logic for your definition. There is a Job field (sys_job) on the trigger record for example which point to a java class.. For example the 'RunScriptJob'.

I need to, when my job with linked definition is triggered, to execute my logic (script) for the references I have on my schedule definition record. So as an easy example, comparable to export sets: On my definition I have a reference to an export set definition, en my logic would be to start a query for that. (again example!, I know this already exists, but I want to understand how to)

 

Any help in getting insights in this would be greatly appreciated!

 

Patrick

 

 

 

 

 

 

1 REPLY 1

Diego Santiago1
Tera Contributor

I have the same situation.

 

I have a job definition (new table) extending from sysauto_script, SncTriggerSynchronizer.synchronize() was syncing the JOB definition on sys_trigger without any issues, it used to work properly on San Diego and older releases, from Tokyo onwards it doesn't work anymore.

 

I am leaning to build a custom script that creates/updates the job on sys_trigger when changing the job definition record.