<h2>Error count and the last error column update criteria on the Scheduled job records</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times;"><strong><span style="color: black;">Overview</span></strong></span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;">When are the “error count” and “last error columns” updated in the scheduled job records under sys trigger table</span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'times new roman', times;"> </span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times;"><strong><span style="color: black;">Description</span></strong></span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;">Under System scheduler application , we do have scheduled job records which have 2 columns for each record – Error count and Last error. Observe that these columns are not always populated for every Job failure. This solution talks about when these columns are updated for a scheduled Job failures</span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;"> </span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;"><img src="/sys_attachment.do?sys_id=5f2a6026db42b450e515c2230596190b" width="1104" height="514" /></span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;"> </span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: black;"> </span></p> <p style="background: white; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times;"><strong><span style="color: black;">Solution</span></strong></span></p> <div style="text-align: center; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" align="center"><hr style="color: black;" /></div> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: #455464; background: white;">The columns are updated only when the error reported in the logs for a scheduled job is popped up by a Java throwable class like Java threads. Ex: Thread.java</span></p> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt;"> </span></p> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: #455464; background: white;"><span style="color: #455464; font-family: SourceSansPro, 'Helvetica Neue', Helvetica, Arial, sans-serif;">In the event a job failed catastrophically and an error bubbles up, the scheduler throw an event and re-queue. </span><br style="box-sizing: border-box; color: #455464; font-family: SourceSansPro, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px;" /><span style="color: #455464; font-family: SourceSansPro, 'Helvetica Neue', Helvetica, Arial, sans-serif;">Note this is a departure from previous behavior that uses to set the state to error after two failures in a row</span></span></p> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: #455464; background: white;"> </span></p> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; font-family: 'times new roman', times; color: #455464; background: white;">Based on the internal code, we can’t expect the above mentioned columns to get updated for every scheduled job failure</span></p> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14pt; color: black; font-family: 'times new roman', times;"> </span></p></section></div></article></div>