Discovery Cancellation Process OverviewDescription<!-- 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{ <a href="border:1px">border:1px</a> solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-<a href="spacing:2;">spacing:2;</a> } table.internaltable { white-<a href="space:nowrap;">space:nowrap;</a> text-<a href="align:left;">align:left;</a> border-width: 1px; border-collapse: collapse; font-<a href="size:14px;">size:14px;</a> 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; } table tr td { padding: 15px; } .title { color: #D1232B; font-<a href="weight:normal;">weight:normal;</a> font-<a href="size:28px;">size:28px;</a> } h1{ color: #D1232B; font-<a href="weight:normal;">weight:normal;</a> font-<a href="size:21px;">size:21px;</a> margin-<a href="bottom:-5px">bottom:-5px</a> } h2{ color: #646464; font-<a href="weight:bold;">weight:bold;</a> font-<a href="size:18px;">size:18px;</a> } h3{ color: #000000; font-<a href="weight:BOLD;">weight:BOLD;</a> font-<a href="size:16px;">size:16px;</a> text-d<a href="ecoration:underline;">ecoration:underline;</a> } h4{ color: #646464; font-<a href="weight:BOLD;">weight:BOLD;</a> font-<a href="size:15px;">size:15px;</a> text-decoration:; } h5{ color: #000000; font-<a href="weight:BOLD;">weight:BOLD;</a> font-<a href="size:13px;">size:13px;</a> text-decoration:; } h6{ color: #000000; font-<a href="weight:BOLD;">weight:BOLD;</a> font-<a href="size:14px;">size:14px;</a> text-decoration:; } hr{ border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; } ul { list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> A discovery schedule can be configured to have a "max run time". The discovery will be automatically cancelled if this max run time is reached. Discovery Cancellation Process Overview A couple of important script includes are called when a discovery is created: DiscoveryStartDiscovery StartDiscovery creates a scheduled job(sys_trigger record) to cancel the discovery. The following is an example scheduled job created to cancel a discovery: The scripts will also log to "System Logs" that the discovery will be cancelled and at what time: Troubleshooting If the discovery is not cancelled as expected, the following can be done for troubleshooting. Check that script includes Discovery and StartDiscovery are OOB.Check that the cancellation scheduled jobs are being created as expected, a test discovery can be run to confirm this.Search the "System Logs > System Log > All" for "Cancelling Discovery <discovery_status_number>" (replace with the actual discovery number). If the "Cancelling Discovery ..." message is found, then the mechanism to cancel the discovery was successful. Check that there were no performance issues at the time the discovery should have been cancelled and that the workers were not behind (unlikely to happen). Additional InformationRelated to this topic: How to troubleshoot a cancelled Discovery in case of max run time window has been exceeded