Scheduled jobs fail silently more than any other script type in ServiceNow. Without proper logging and error handling, you'll never know if your job ran, what it processed, or why it stopped working. The platform's 30-minute execution limit makes this worse β€” jobs that take too long just disappear with no error message. Your scheduled job needs to be built like a production service: structured logging, progress tracking, graceful error handling, and bounded execution.

When to use scheduled jobs

  • Batch processing records that don't require user interaction β€” data cleanup, status updates, archiving old records
  • Integration tasks that need to run on a schedule β€” pushing data to external systems, pulling updates from APIs
  • Maintenance tasks during off-hours β€” rebuilding search indexes, clearing cache tables, generating reports
  • Processing bounded datasets where you can predict execution time β€” avoid jobs that could process unlimited records

When NOT to use scheduled jobs

  • Real-time processing that users expect immediately β€” use Business Rules or Flow Designer instead
  • Processing millions of records in one job β€” split into multiple smaller jobs or use Import Sets with Transform Maps
  • Complex workflows requiring user input or approval β€” use Flow Designer or Workflow instead
  • Tasks that need to run more frequently than every 2 minutes β€” scheduled jobs have minimum interval limits

Key behaviors and gotchas

  • 30-minute execution timeout kills jobs silently β€” always use setLimit() to bound your queries
  • Jobs run as the system user and bypass ACLs β€” your job can access and modify any record
  • Business Rules still fire on records you update β€” factor their execution time into your processing estimates
  • Failed jobs show as Complete in the job history β€” only logging reveals the actual outcome
  • Progress logging every 100 records helps diagnose where jobs fail and provides user confidence
  • Individual record errors shouldn't kill the entire job β€” catch exceptions inside your processing loop
⚠️

Never run unbounded queries in scheduled jobs. A query without setLimit() that returns 50,000 records will timeout and fail silently, leaving no trace in the job history. Always set reasonable limits and run multiple smaller jobs instead of one massive job.

Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros β€” scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam Β· Unsubscribe anytime