Scheduled job is not running automatically, Every time i am executing manually.

subbarayudu
Tera Contributor

I want to run the scheduled job automatically but is not doing, every time i have to click execute now button.

Could you let me know the reason why it is behaving it and how to correct it.

 I have created this in scoped application  because third party risk management is the scoped application.

subbarayudu_0-1723044184043.png

var issueGr = new GlideRecord('sn_vdr_risk_asmt_issue');
issueGr.addEncodedQuery('stateNOT IN3,4,7^u_date_identifiedISNOTEMPTY');
issueGr.query();
while (issueGr.next()) {
    var idt1 = new GlideDateTime(issueGr.u_date_identified);
    var idt2 = new GlideDateTime();
    var difference = GlideDateTime.subtract(idt1, idt2);
    days = difference.getDayPart();
    issueGr.u_issue_age_days = days;
    issueGr.update();
}

 

16 REPLIES 16

Were there any errors in the system log when the scheduled job was automatically executed?
As @SN_Learn points out, it may work if you set the execution user to your user, but the error content should help you find the fundamental reason why it doesn't work in System Administrator.

subbarayudu
Tera Contributor

@Mio Matsushita I am not getting any error in logs, i have changed the runas to some other person also it not running on scheduled time

Ana de Pinho
Tera Contributor

Hi

Have you been able to solve this problem? I have the same problem and have tried everything possible...

Viraj Hudlikar
Tera Sage

Hello @subbarayudu 

Is the user kept in Run as is active?
Also have a look on this KB Scheduled job not running with definition present - Support and Troubleshooting

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

Ana de Pinho
Tera Contributor

Hello @Viraj Hudlikar 
In my case, yes. The user is active and has all the necessary roles. The record in the sys_trigger table exists and seems to be configured correctly. If the scheduled job is executed manually with the “execute now” button, everything works and runs smoothly.