Changing Schedule on sys_trigger for "Cancel Expired Assessments"

robertyoung
Giga Contributor

We want to run this guy every day. Tried to change it right in sys_trigger and got mixed results. seemed to work in one instance but not another.

Do you guys know the preferred way to change a scheduled job that exists only in sys_trigger? I think what may be going on is that the current run just hasn't happened yet so the new duration hasn't taken over.

Not sure how to run a scheduled job straight out of the trigger table, there is not an "Execute Now"

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

Hi Robert,



You can use below code to run scheduled job with script.



//Execute a scheduled script job


var rec = new GlideRecord('sysauto_script');


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


SncTriggerSynchronizer.executeNow(rec);



Regards,


Sachin


The issue is that particular job does not show up in "Scheduled Jobs" it's some kind of background job that we don't seem to get to directly control as SNOW admins...


Running that script doesn't work either because it's not in the sysauto_script table. It's only in sys_trigger


sachin_namjoshi
Kilo Patron
Kilo Patron

You can also open scheduled job and click execute now to run scheduled job via UI.



find_real_file.png


merbs
Mega Contributor

Did you ever resolve? I have the same questions:

Do you guys know the preferred way to change a scheduled job that exists only in sys_trigger?  

Not sure how to run a scheduled job straight out of the trigger table, there is not an "Execute Now"