Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Best practices for Max Runtime for Discoveries Schedules.

RogerioManca
Tera Contributor

Would like to know if there is any best practices to setup the Max run time for discovery schedules?

Which number would be a good solution? around more 30% of the time needed?

Thank you guys in Advance.

1 ACCEPTED SOLUTION

pavani_paluri
Tera Guru

Hi @RogerioManca ,

 

When you set up Max Runtime for Discovery schedules in ServiceNow, the goal is to prevent a discovery from running endlessly if something hangs, while still giving it enough time to finish under normal conditions.

 

  • Measure first: Run your discovery schedules a few times and note how long they usually take.
  • Add a buffer: Set the Max Runtime to about 20–30% longer than the average run time you observed.
    • Example: If a subnet discovery normally takes 60 minutes, set Max Runtime to ~75–80 minutes.
  • Avoid extremes: Don’t set it too short (you’ll cut off valid runs), and don’t set it excessively long (you’ll lose the safeguard against stuck jobs).
  • Tailor per schedule: Different subnets or application services can vary a lot in complexity, so adjust Max Runtime individually rather than using one blanket value.
  • Monitor and refine: Check Discovery Status logs regularly and adjust if you see frequent premature cancellations or jobs running longer than expected.

Best practice summary:

  • Start with observed average run times.
  • Add ~20–30% buffer.
  • Tune per schedule, not globally.
  • Use “Run After” sequencing to avoid overlap.

This way, you balance reliability with protection against runaway discoveries.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

 

View solution in original post

1 REPLY 1

pavani_paluri
Tera Guru

Hi @RogerioManca ,

 

When you set up Max Runtime for Discovery schedules in ServiceNow, the goal is to prevent a discovery from running endlessly if something hangs, while still giving it enough time to finish under normal conditions.

 

  • Measure first: Run your discovery schedules a few times and note how long they usually take.
  • Add a buffer: Set the Max Runtime to about 20–30% longer than the average run time you observed.
    • Example: If a subnet discovery normally takes 60 minutes, set Max Runtime to ~75–80 minutes.
  • Avoid extremes: Don’t set it too short (you’ll cut off valid runs), and don’t set it excessively long (you’ll lose the safeguard against stuck jobs).
  • Tailor per schedule: Different subnets or application services can vary a lot in complexity, so adjust Max Runtime individually rather than using one blanket value.
  • Monitor and refine: Check Discovery Status logs regularly and adjust if you see frequent premature cancellations or jobs running longer than expected.

Best practice summary:

  • Start with observed average run times.
  • Add ~20–30% buffer.
  • Tune per schedule, not globally.
  • Use “Run After” sequencing to avoid overlap.

This way, you balance reliability with protection against runaway discoveries.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P