How to detect stuck scheduled jobs that may be stuck on a non-existent nodeDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Description The glide.scheduler thread on an application node will claim jobs from the sys_trigger table to run on that node. Sometimes we may encounter the circumstance where a scheduled job is claimed by a node and then some maintenance occurs and the node is retired or moved. In those cases, the claimed jobs will be in a "limbo" state. This knowledge article demonstrates how one can identify such scheduled jobs. Procedure Navigate to the System Maintenance > Scripts - Background module, copy the following snippet of javascript into the field labeled "Run script (JavaScript executed on server)", and click on the Run Script button. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 showScheduledJobsStuckOnMissingNodes(); function showScheduledJobsStuckOnMissingNodes() { var gr = new GlideRecord('sys_trigger'); // Query only jobs that are queued or "running" gr.addQuery('state', 'IN', '1,2'); // Filter out those that are not claimed by any node gr.addQuery('claimed_by', '!=', 'NULL'); // Filter out those that are claimed by a valid node var gr2 = new GlideRecord('sys_cluster_state'); gr2.query(); while (gr2.next()) { gr.addQuery('claimed_by', '!=', gr2.system_id); // Filter out any valid system_id values. } gr.query(); // Display a warning for each suspect scheduled jobs while (gr.next()) { gs.print('WARNING: sys_trigger.' + gr.sys_id + ' has a state of ' + gr.state + ' and is claimed by node ' + gr.claimed_by) } } Applicable Versions All