frappe-syntax-scheduler

Define Frappe scheduler events and background jobs with cron, queues, and retries.

Updated May 31, 2026
One-click install
npx skills add https://github.com/anonymousminati/Res-POS --skill frappe-syntax-scheduler-anonymousminati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-syntax-scheduler
Source: https://github.com/anonymousminati/Res-POS/tree/main/.claude/skills/syntax/frappe-syntax-scheduler
Command: npx skills add https://github.com/anonymousminati/Res-POS --skill frappe-syntax-scheduler-anonymousminati

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the guesswork from configuring Frappe scheduler events and background jobs, helping you choose the right execution model, queue, and error handling approach for recurring or deferred work.

Core Features & Use Cases

  • Scheduler event design: Map periodic tasks to the correct hooks.py event type, including hourly, daily, weekly, monthly, and custom cron schedules.
  • Background job execution: Use frappe.enqueue, frappe.enqueue_doc, and queue_action for async processing, document methods, retries, and progress updates.
  • Operational reliability: Apply deduplication, queue selection, commit and rollback patterns, monitoring, and scheduler diagnostics for production-ready automation.
  • Use case: Configure a daily export job that delegates heavy processing to a long queue, avoids duplicate runs, logs failures, and stays observable through scheduler logs.

Quick Start

Ask the AI to design a Frappe scheduler job for your app, including the appropriate hook, queue, deduplication, and error-handling pattern.

Frequently Asked Questions about frappe-syntax-scheduler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule a background job in Frappe without duplicate runs?

To prevent duplicate background job runs in Frappe, use frappe.enqueue with a unique job_id and check is_job_enqueued before scheduling. This deduplication approach ensures only one instance executes per queue, avoiding overlapping task conflicts.

What is the correct way to define periodic cron schedules in Frappe hooks.py?

Frappe scheduler events are defined in hooks.py by mapping event names like hourly, daily, or custom cron schedules to Python methods. You must run bench migrate after changing hooks to register the new scheduler event configurations.

Which Frappe queue should I use for long-running background processing?

Frappe offers multiple queues for background jobs, and heavy or long-running processing should be delegated to the long queue. Selecting the correct queue prevents blocking default tasks and keeps standard operations responsive.

How does error handling work with frappe.enqueue_doc for document methods?

Error handling for frappe.enqueue_doc requires explicit commit-or-rollback patterns to manage database state during failures. Proper handling ensures that document method retries and progress reporting remain reliable across v14-v16 workflows.

Why are my Frappe scheduler events not triggering after updating hooks?

Frappe scheduler events fail to trigger after hooks changes if bench migrate is not run, as the framework requires this command to sync new scheduler configurations. Additionally, verify correct queue selection and check scheduler diagnostics logs.