scheduled-jobs

scheduled-jobs is a skill for Claude Code from serac-labs/serac. It costs 37 tokens per session (2,689 once invoked), scanned A, original, Apache-2.0.

A guide for creating recurring automated jobs in ServiceNow, an enterprise platform for managing IT work and services. It covers scheduled scripts, reports, cleanup tasks, LDAP refreshes, and discovery jobs.

In plain words
What is it for?
Use it to configure daily or weekly jobs, process records in batches, send failure notifications, and track job results.
Why use it?
It provides patterns for running maintenance or batch work on a schedule, including time limits, conditions, error notices, and recorded metrics.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the servicenow plugin — 70 skills shipped together

Good fit Use it to configure daily or weekly jobs, process records in batches, send failure notifications, and track job results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serac-labs/serac/scheduled-jobs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serac-labs/serac --skill scheduled-jobs
Clone the repo
git clone --depth 1 https://github.com/serac-labs/serac

Made for: Claude Code.

Or install servicenow, the plugin that ships this one along with the rest of its 70 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scheduled-jobs

README.md
[![agentmods](https://agentmods.dev/badge/skills/serac-labs/serac/scheduled-jobs/github.svg)](https://agentmods.dev/skills/serac-labs/serac/scheduled-jobs)
Your own site
<a href="https://agentmods.dev/skills/serac-labs/serac/scheduled-jobs"><img src="https://agentmods.dev/badge/skills/serac-labs/serac/scheduled-jobs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scheduled-jobs

Your own site · 80×15
<a href="https://agentmods.dev/skills/serac-labs/serac/scheduled-jobs"><img src="https://agentmods.dev/badge/skills/serac-labs/serac/scheduled-jobs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.02689
Opus 5 $0.00018 $0.01345
Sonnet 5 $0.00007 $0.00538
Haiku 4.5 $0.00004 $0.00269

Measured 12d ago against content hash 3cc2657596e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

scheduled-jobs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/skills/scheduled-jobs/SKILL.md · 413 lines

How it starts

The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scheduled Jobs for ServiceNow

Scheduled Jobs automate recurring tasks, batch processing, and maintenance operations.

Job Types

Type Table Purpose
Scheduled Script Execution sysauto_script Run custom scripts
Report Scheduler sysauto_report Generate and email reports
Table Cleaner sys_auto_flush Delete old records
LDAP Refresh ldap_server_config Sync LDAP data
Discovery discovery_schedule Network discovery

Scheduled Script Execution (ES5)

Basic Scheduled Job

// Table: sysauto_script
// Name: Close Stale Incidents
// Run: Daily at 2:00 AM

// Script (ES5 ONLY!):
;(function executeScheduledJob() {
  var LOG_PREFIX = "[CloseStaleIncidents] "
  var closedCount = 0

  // Find incidents inactive for 30 days
  var staleDate = new GlideDateTime()
  staleDate.addDaysLocalTime(-30)

  var gr = new GlideRecord("incident")
  gr.addQuery("state", "IN", "1,2,3") // New, In Progress, On Hold
  gr.addQuery("sys_updated_on", "<", staleDate)
  gr.addQuery("active", true)
  gr.query()

  gs.info(LOG_PREFIX + "Found " + gr.getRowCount() + " stale incidents")

  while (gr.next()) {
    gr.state = 7 // Closed
    gr.close_code = "Closed/Resolved by Caller"
    gr.close_notes = "Auto-closed due to 30 days of inactivity"
    gr.update()
    closedCount++
  }

  gs.info(LOG_PREFIX + "Closed " + closedCount + " stale incidents")
})()

Scheduled Job with Error Handling (ES5)

// Name: Sync User Data
// Run: Every 6 hours

;(function executeScheduledJob() {
  var LOG_PREFIX = "[SyncUserData] "
  var stats = {
    processed: 0,
    updated: 0,
    errors: 0,
  }

  try {
    // Get users needing sync
    var gr = new GlideRecord("sys_user")
    gr.addQuery("u_needs_sync", true)
    gr.addQuery("active", true)
    gr.setLimit(1000) // Process in batches
    gr.query()

    while (gr.next()) {
      stats.processed++
      try {
        var updated = syncUserFromSource(gr)
        if (updated) {
          stats.updated++
        }
      } catch (e) {
        stats.errors++
        gs.error(LOG_PREFIX + "Error syncing user " + gr.user_name + ": " + e.message)
      }
    }

    gs.info(LOG_PREFIX + "Sync complete: " + JSON.stringify(stats))

    // Send summary email if errors
    if (stats.errors > 0) {
      sendErrorSummary(stats)
    }
  } catch (e) {
    gs.error(LOG_PREFIX + "Job failed: " + e.message)
    notifyAdmins("User sync job failed: " + e.message)
  }

  function syncUserFromSource(userGr) {
    // Sync logic here
    userGr.u_needs_sync = false
    userGr.u_last_sync = new GlideDateTime()
    return userGr.update()
  }

  function sendErrorSummary(stats) {
    gs.eventQueue("user.sync.errors", null, JSON.stringify(stats), "")
  }

  function notifyAdmins(message) {
    gs.eventQueue("system.job.failure", null, message, "")
  }
})()

Read the full file on GitHub · 413 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 413 lines · 37 tokens per session scan A 3cc2657596e9

Subscribe to this mod's changes

scheduled-jobs is a skill published in the GitHub repository serac-labs/serac (78 stars, last pushed 2d ago), licensed Apache-2.0. It adds 37 tokens to every session and 2,689 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.