Agent skill

Frappe Syntax Scheduler

by Impertio-Studio in Impertio-Studio/Frappe_Claude_Skill_Package

A skill your agent uses when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16.

MITAuto-check passedBackend & APIs

Install Frappe Syntax Scheduler

skills CLI
$ npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Impertio-Studio/Frappe_Claude_Skill_Package frappe-syntax-scheduler --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/source/syntax/frappe-syntax-scheduler .claude/skills/frappe-syntax-scheduler && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
frappe-syntax-scheduler
GitHub stars
188
Token cost
~2.7k tokens
SKILL.md length
480 words
Files
13 (incl. references)
Skills in repo
61
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16.

  • Works in 7 steps: ALWAYS run bench migrate after any… → ALWAYS use job_id + is_job_enqueued()… → ALWAYS choose the correct queue:… → …
  • Configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16
  • SKILL.md covers Decision Tree, Quick Reference: Scheduler…, Scheduler Event Types and Cron Syntax, plus 15 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Frappe Syntax Scheduler is an agent skill from Impertio-Studio/Frappe_Claude_Skill_Package. Use when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16. Covers schedulerevents in hooks.py, frappe.enqueue() for async jobs, queue configuration, job deduplication, error handling, and monitoring. Keywords: scheduler, background job, cron, RQ worker, job queue, async task, frappe.enqueue, scheduled task, cron syntax, how often does it run, background job example, enqueue example.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `references/anti-patterns.md`, `references/enqueue-api.md` and `references/error-handling.md`). Compatibility notes: Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

It sits in Backend & APIs, covering Scheduled and recurring tasks, Background jobs and Data cleaning. The repository describes itself as: 60 deterministic Claude AI skills for Frappe Framework & ERPNext v14-v16 development and operations. The licence is MIT.

When your agent uses it

  • Configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16
  • Tasks that involve Scheduled and recurring tasks
  • Tasks that involve Background jobs

Example prompts

  • “/frappe-syntax-scheduler”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. ALWAYS run bench migrate after any scheduler_events change in hooks.py
  2. ALWAYS use job_id + is_job_enqueued() for deduplication [v15+]
  3. ALWAYS choose the correct queue: short/default/long based on task duration
  4. ALWAYS commit per record and rollback on error in batch jobs
  5. ALWAYS remember that scheduler jobs run as Administrator
  6. NEVER run heavy logic directly in a scheduler event — enqueue it instead
  7. NEVER use job_name for deduplication in new code (v14 legacy)

What it can do on your machine

Read from SKILL.md and the folder at commit 36cfa80. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.

    From compatibility in the SKILL.md frontmatter.

Context cost

Frappe Syntax Scheduler loads about 2.7k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 480 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Impertio-Studio/Frappe_Claude_Skill_Package at commit 36cfa80, republished under its MIT licence (© Impertio-Studio). 480 words, ~2,699 tokens.

Download SKILL.mdSave it as .claude/skills/frappe-syntax-scheduler/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
frappe-syntax-scheduler
description
Use when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16. Covers scheduler_events in hooks.py, frappe.enqueue() for async jobs, queue configuration, job deduplication, error handling, and monitoring. Keywords: scheduler, background job, cron, RQ worker, job queue, async task, frappe.enqueue, scheduled task, cron syntax, how often does it run, background job example, enqueue example.
compatibility
Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16.
license
MIT
metadata.author
OpenAEC-Foundation
metadata.version
2.0

Frappe Scheduler & Background Jobs

Deterministic syntax reference for Frappe scheduler events and background job processing via Redis Queue (RQ).

Decision Tree

Need periodic execution?
├─ Fixed interval (hourly/daily/weekly/monthly) → scheduler_events in hooks.py
├─ Custom cron schedule → scheduler_events.cron in hooks.py
├─ User-configurable interval → Scheduled Job Type DocType
└─ No, triggered by user/event
   ├─ Run method on a specific document → frappe.enqueue_doc()
   ├─ Run standalone function async → frappe.enqueue()
   └─ Run from controller on self → self.queue_action()

Quick Reference: Scheduler Events (hooks.py)

python
# hooks.py — ALWAYS run bench migrate after changes
scheduler_events = {
    # Standard events (default queue)
    "all": ["myapp.tasks.every_tick"],           # Every tick [v14: 240s, v15+: 60s]
    "hourly": ["myapp.tasks.hourly_task"],
    "daily": ["myapp.tasks.daily_task"],
    "weekly": ["myapp.tasks.weekly_task"],
    "monthly": ["myapp.tasks.monthly_task"],

    # Long queue events (for heavy processing)
    "hourly_long": ["myapp.tasks.hourly_heavy"],
    "daily_long": ["myapp.tasks.daily_heavy"],
    "weekly_long": ["myapp.tasks.weekly_heavy"],
    "monthly_long": ["myapp.tasks.monthly_heavy"],

    # Cron events (croniter-compatible syntax)
    "cron": {
        "*/15 * * * *": ["myapp.tasks.every_15_min"],
        "0 9 * * 1-5": ["myapp.tasks.weekday_9am"],
        "0 0 1 * *": ["myapp.tasks.first_of_month"],
    }
}

CRITICAL: ALWAYS run bench migrate after ANY change to scheduler_events. Without it, changes are NOT applied.

Scheduler Event Types

EventFrequencyQueueUse Case
allEvery tick [v14: 4min, v15+: 60s]defaultFrequent polling
hourlyOnce per hourdefaultSync, cleanup
dailyOnce per daydefaultReports, summaries
weeklyOnce per weekdefaultArchival
monthlyOnce per monthdefaultBilling, statements
hourly_longOnce per hourlongHeavy sync
daily_longOnce per daylongLarge exports
weekly_longOnce per weeklongData warehousing
monthly_longOnce per monthlongAnnual reports
cronCustom scheduleconfigurableAny custom timing

Cron Syntax

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *
SymbolMeaningExample
*Any value* * * * * = every minute
,List1,15 * * * * = minute 1 and 15
-Range0 9-17 * * * = hours 9 through 17
/Interval*/10 * * * * = every 10 minutes

Common patterns:

  • Every 5 min: */5 * * * *
  • Weekdays at 9:00: 0 9 * * 1-5
  • Monday at 8:00: 0 8 * * 1
  • Business hours hourly: 0 9-17 * * 1-5

Quick Reference: frappe.enqueue()

python
frappe.enqueue(
    method,                      # REQUIRED: function or "dotted.module.path"
    queue="default",             # "short", "default", "long", or custom
    timeout=None,                # Override queue timeout (seconds)
    is_async=True,               # False = run synchronously (skip worker)
    now=False,                   # True = run via frappe.call() directly
    job_id=None,                 # [v15+] Unique ID for deduplication
    enqueue_after_commit=False,  # Wait for DB commit before enqueue
    at_front=False,              # Place at front of queue
    on_success=None,             # Success callback
    on_failure=None,             # Failure callback
    **kwargs                     # Arguments passed to method
)

Queue Types

QueueDefault TimeoutUse When
short300s (5 min)Task < 30 seconds
default300s (5 min)Task 30s - 5 min
long1500s (25 min)Task 5 - 25 min
long + custom timeoutuser-definedTask > 25 min
python
# Short queue — quick status update
frappe.enqueue("myapp.tasks.update_status", queue="short", doc=doc.name)

# Long queue — heavy report generation
frappe.enqueue("myapp.tasks.generate_report", queue="long", timeout=3600)

frappe.enqueue_doc()

Enqueue a controller method on a specific document.

python
frappe.enqueue_doc(
    "Sales Invoice",              # DocType
    "SINV-00001",                 # Document name
    "send_notification",          # Controller method name
    queue="long",
    timeout=600,
    recipient="user@example.com"  # kwargs passed to method
)

The controller method MUST be decorated with @frappe.whitelist():

python
class SalesInvoice(Document):
    @frappe.whitelist()
    def send_notification(self, recipient):
        # self is the loaded document
        pass

self.queue_action()

Alternative from within a controller:

python
class SalesOrder(Document):
    def on_submit(self):
        self.queue_action("send_emails", emails=email_list)

    def send_emails(self, emails):
        for email in emails:
            send_mail(email)

Job Deduplication

python
from frappe.utils.background_jobs import is_job_enqueued

job_id = f"import::{doc.name}"
if not is_job_enqueued(job_id):
    frappe.enqueue(
        "myapp.tasks.import_data",
        job_id=job_id,
        doc_name=doc.name
    )
else:
    frappe.msgprint("Import already in progress")
[v14] Legacy Pattern (NEVER use in new code)
python
from frappe.core.page.background_jobs.background_jobs import get_info
enqueued = [d.get("job_name") for d in get_info()]
if name not in enqueued:
    frappe.enqueue(..., job_name=name)

Error Handling Pattern

ALWAYS use try/except with commit/rollback per record in batch jobs:

python
def process_records(records):
    success, errors = 0, 0
    for record in records:
        try:
            process_single(record)
            frappe.db.commit()
            success += 1
        except Exception:
            frappe.db.rollback()
            frappe.log_error(
                frappe.get_traceback(),
                f"Process Error: {record}"
            )
            errors += 1
    return {"success": success, "errors": errors}

Retry Pattern

python
def task_with_retry(data, retry_count=0, max_retries=3):
    try:
        external_api_call(data)
    except Exception:
        if retry_count < max_retries:
            frappe.enqueue(
                "myapp.tasks.task_with_retry",
                queue="default",
                data=data,
                retry_count=retry_count + 1,
                max_retries=max_retries,
                enqueue_after_commit=True
            )
            frappe.log_error(f"Retry {retry_count+1}/{max_retries}", "Task Retry")
        else:
            frappe.log_error(frappe.get_traceback(), f"Failed after {max_retries} retries")
            raise

Callbacks

python
def on_success_handler(job, connection, result, *args, **kwargs):
    frappe.publish_realtime("show_alert", {"message": "Done!"})

def on_failure_handler(job, connection, type, value, traceback):
    frappe.log_error(f"Job {job.id} failed: {value}", "Job Error")

frappe.enqueue(
    "myapp.tasks.risky_task",
    on_success=on_success_handler,
    on_failure=on_failure_handler,
)

Progress Updates

python
def long_task(items, user):
    total = len(items)
    for i, item in enumerate(items):
        process_item(item)
        frappe.publish_realtime(
            "task_progress",
            {"progress": (i + 1) / total * 100, "current": i + 1, "total": total},
            user=user,
        )

User Context

CRITICAL: Scheduler jobs run as Administrator. ALWAYS set explicit ownership when creating documents:

python
def scheduled_task():
    doc = frappe.new_doc("ToDo")
    doc.owner = "user@example.com"
    doc.insert(ignore_permissions=True)
Show full SKILL.md (198 more words)Show less

Monitoring

ToolPurpose
bench doctorScheduler status, worker health
RQ Worker (DocType)Worker status: busy/idle
RQ Job (DocType)Job status, queue filtering
Scheduled Job Log (DocType)Execution history, errors
logs/worker.error.logWorker exceptions
logs/scheduler.logScheduler activity

Version Differences

Featurev14v15+
Tick interval (all event)~240s (4 min)~60s
Config key for tickscheduler_intervalscheduler_tick_interval
Deduplicationjob_name (deprecated)job_id + is_job_enqueued()

Custom tick in common_site_config.json:

json
{ "scheduler_tick_interval": 120 }

Critical Rules

  1. ALWAYS run bench migrate after any scheduler_events change in hooks.py
  2. ALWAYS use job_id + is_job_enqueued() for deduplication [v15+]
  3. ALWAYS choose the correct queue: short/default/long based on task duration
  4. ALWAYS commit per record and rollback on error in batch jobs
  5. ALWAYS remember that scheduler jobs run as Administrator
  6. NEVER run heavy logic directly in a scheduler event — enqueue it instead
  7. NEVER use job_name for deduplication in new code (v14 legacy)

Reference Files

See Also

  • frappe-syntax-hooks — Full hooks.py reference
  • frappe-core-background — Background job architecture
  • frappe-errors-jobs — Job failure debugging

© Impertio-Studio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (references) in skills/source/syntax/frappe-syntax-scheduler of Impertio-Studio/Frappe_Claude_Skill_Package.

  • SKILL.md
  • references/anti-patterns.md
  • references/enqueue-api.md
  • references/error-handling.md
  • references/events.md
  • references/examples.md
  • references/hooks.md
  • references/methods.md
  • references/monitoring.md
  • references/patterns.md
  • references/queues.md
  • references/scheduler-events.md
  • references/syntax.md

Open the folder on GitHubat commit 36cfa80

Compare with similar skills

Frappe Syntax Scheduler next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Frappe Syntax Scheduler compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frappe Syntax Scheduler this skillImpertio-Studio/Frappe_Claude_Skill_Package188—~2.7kAutomated safety check: PassMIT
Trigger.dev Background Taskspapermark/papermark9.2k—~2.1kAutomated safety check: PassCustom licence
Frappe App Devfrappe/skills147—~943Automated safety check: PassNone
Schkedbibendi/schked138—~454Automated safety check: PassMIT
Job Patternsdilolabs/nosia2131 repos~1.6kAutomated safety check: PassMIT
Sap Btp Job Schedulingsecondsky/sap-skills462—~3.6kAutomated safety check: PassGPL-3.0

Similar skills

  • Trigger.dev Background Tasks

    papermark/papermark

    Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.

    9.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Frappe App Dev

    frappe/skills

    Builds full-stack Frappe Framework applications end-to-end. An agent skill from frappe/skills.

    147 GitHub stars~943 tokensUpdated today
    Backend & APIsAuto-check passed
  • Schked

    bibendi/schked

    Guide for working with Schked, a Ruby recurring-job scheduler built on top of rufus-scheduler.

    138 GitHub stars~454 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Job Patterns

    dilolabs/nosia

    Implements shallow background jobs with later/now conventions using Solid Queue.

    213 GitHub starsUsed in 1 repo~1.6k tokens
    Backend & APIsAuto-check passed
  • Sap Btp Job Scheduling

    secondsky/sap-skills

    This skill provides comprehensive guidance for SAP BTP Job Scheduling Service development, configuration, and operations.

    462 GitHub stars~3.6k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Scheduled events (Mendix's cron) and task queues in MDL — the eight repeat variants and the fields each takes, and what a queue does and does not throttle.

    129 GitHub stars~3.3k tokensUpdated today
    Backend & APIsAuto-check passed

More from Impertio-Studio/Frappe_Claude_Skill_Package

All 61 skills in this repo
  • Frappe Ops Website Deploy

    Impertio-Studio/Frappe_Claude_Skill_Package

    Deploy HTML/CSS websites to ERPNext/Frappe (v15/v16) as Web Pages via the REST API.

    189 GitHub stars~2.5k tokensUpdated 22 days ago
    Auto-check passed
  • Frappe Agent Architect

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when designing multi-app Frappe architectures, deciding whether to split functionality into separate apps, or implementing cross-app communication patterns.

    189 GitHub stars~2.8k tokensUpdated 22 days ago
    Auto-check passed
  • Frappe Agent Debugger

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when debugging Frappe errors, using bench console for live inspection, analyzing tracebacks, or reading Frappe log files.

    189 GitHub stars~2.9k tokensUpdated 22 days ago
    Auto-check passed
  • Frappe Agent Interpreter

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when receiving vague or unclear ERPNext/Frappe development requests that need interpretation.

    189 GitHub stars~3.2k tokensUpdated 22 days ago
    Auto-check passed
  • Frappe Agent Migrator

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when migrating a Frappe app between major versions, detecting breaking API changes, or resolving post-migration errors.

    189 GitHub stars~2.8k tokensUpdated 22 days ago
    Auto-check: notes
  • Frappe Agent Validator

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when reviewing or validating Frappe/ERPNext code against best practices and common pitfalls.

    189 GitHub stars~2.8k tokensUpdated 22 days ago
    Auto-check passed

Questions about Frappe Syntax Scheduler

What does Frappe Syntax Scheduler do?

A skill your agent uses when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16. Frappe Syntax Scheduler is an agent skill from Impertio-Studio/Frappe_Claude_Skill_Package. Use when configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16.

When should I use Frappe Syntax Scheduler?

Frappe Syntax Scheduler fits situations like: configuring scheduler events and background jobs in Frappe/ERPNext v14/v15/v16; tasks that involve Scheduled and recurring tasks; tasks that involve Background jobs.

How do I install Frappe Syntax Scheduler in Claude Code?

Run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler -a claude-code`. Or copy the skill folder (skills/source/syntax/frappe-syntax-scheduler in Impertio-Studio/Frappe_Claude_Skill_Package) into .claude/skills/frappe-syntax-scheduler in your project. Claude Code loads it when a task matches its description.

How do I install Frappe Syntax Scheduler in Codex?

Run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler -a codex`. Or copy the skill folder (skills/source/syntax/frappe-syntax-scheduler in Impertio-Studio/Frappe_Claude_Skill_Package) into .agents/skills/frappe-syntax-scheduler in your project. Codex loads it when a task matches its description.

Can I use Frappe Syntax Scheduler in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frappe-syntax-scheduler, .gemini/skills/frappe-syntax-scheduler, .github/skills/frappe-syntax-scheduler and .opencode/skills/frappe-syntax-scheduler in your project.

What does Frappe Syntax Scheduler need to run?

SKILL.md names no scripts, command-line tools or credentials: Frappe Syntax Scheduler is instructions for the agent only. Our summary lists: Python 3. Compatibility (from SKILL.md): Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16..

Does Frappe Syntax Scheduler access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Frappe Syntax Scheduler safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Frappe Syntax Scheduler use?

Frappe Syntax Scheduler is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frappe Syntax Scheduler use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Frappe Syntax Scheduler?

Skills that share tags, products or a category with Frappe Syntax Scheduler: Trigger.dev Background Tasks (papermark/papermark, 9.2k stars), Frappe App Dev (frappe/skills, 147 stars), Schked (bibendi/schked, 138 stars) and Job Patterns (dilolabs/nosia, 213 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frappe Syntax Scheduler?

Impertio-Studio (a GitHub organization) maintains it in Impertio-Studio/Frappe_Claude_Skill_Package, which has 188 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on September 17, 2026.

Source: Impertio-Studio/Frappe_Claude_Skill_Package on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.