t8y2/dbx · error

scheduler job not found: %s

Error message

scheduler job not found: %s

What it means

The scheduler-job resolver matches a job name against catalog candidates case-insensitively. When no candidate matches, it returns 'scheduler job not found: <name>'. Xugu jobs are database-scoped (not schema objects), so lookup is purely by name within the current database.

Source

Thrown at agents/drivers/xugu/main.go:3275

	if err != nil {
		return "", err
	}
	if len(candidates) == 0 {
		candidates, err = s.catalogSchedulerJobNameCandidates(xuguCatalogSchedulerJobNameQuery(name, true))
		if err != nil {
			return "", err
		}
	}
	for _, candidate := range candidates {
		if candidate == name {
			return candidate, nil
		}
	}
	if len(candidates) == 1 {
		return candidates[0], nil
	}
	if len(candidates) == 0 {
		return "", fmt.Errorf("scheduler job not found: %s", name)
	}
	return "", fmt.Errorf("scheduler job name is ambiguous: %s; specify the catalog's exact case", name)
}

func xuguCatalogSchedulerJobNameQuery(name string, caseInsensitive bool) string {
	expr := quoteStringLiteral(name)
	if caseInsensitive {
		expr = quoteStringLiteral(strings.ToUpper(name))
		return xuguCatalogSchedulerJobNameSelectSQL + "\n  AND UPPER(JOB_NAME) = " + expr
	}
	return xuguCatalogSchedulerJobNameSelectSQL + "\n  AND JOB_NAME = " + expr
}

func (s *server) catalogSchedulerJobNameCandidates(query string) ([]string, error) {
	rows, err := s.queryRows(strings.TrimSpace(query), nil)
	if err != nil {
		return nil, err
	}

View on GitHub (pinned to c0390bff16)

Solutions

  1. List the actual scheduler jobs in the current database and use an exact existing name.
  2. Verify you are connected to the database that owns the job.
  3. Check the name's spelling and case against the catalog and retry with exact case.
  4. Recreate the job if it was dropped unintentionally.

Example fix

// before
getSchedulerJobSource("Nightly_Etl") // not found
// after
jobs := listSchedulerJobs() // shows "NIGHTLY_ETL"
getSchedulerJobSource(jobs[0])
Defensive patterns

Strategy: validation

Validate before calling

// verify job name against the catalog before RPC
jobs := listSchedulerJobs()
if !contains(jobs, name) {
  return fmt.Errorf("job %q not in catalog; existing: %v", name, jobs)
}

Try / catch

if err := getJobSource(name); err != nil {
  if strings.Contains(err.Error(), "scheduler job not found") {
    name = pickExactNameFromListing(listSchedulerJobs())
    getJobSource(name)
  }
}

Prevention

When it happens

Trigger: Calling a scheduler-job RPC (e.g. resolve job name / get source) with a job name that does not exist in the current database — wrong spelling, wrong case under a case-sensitive match, or the job lives in another database.

Common situations: Job dropped or renamed since the client cached its name; connected to a different database than where the job lives; typo or case mismatch.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/0367681f0cfb4b2e. Report an issue: GitHub.