frappe-syntax-scheduler

Configure Frappe scheduler_events and background job enqueuing with queue selection and deduplication.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-syntax-scheduler
Source: https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/syntax/frappe-syntax-scheduler
Command: npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-syntax-scheduler-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents production failures and silent misconfigurations when configuring Frappe/ERPNext scheduler events and background jobs, especially around queue choice, cron syntax, and operational safety steps like running bench migrate.

Core Features & Use Cases

  • Scheduler event configuration: Defines correct scheduler_events patterns for all, hourly, daily, weekly, monthly, plus _long variants and cron-based schedules in hooks.py.
  • Background job enqueuing syntax: Provides correct usage of frappe.enqueue(), frappe.enqueue_doc(), and controller-based self.queue_action() for async processing.
  • Production-grade operational guardrails: Includes rules for bench migrate, job deduplication via job_id + is_job_enqueued() (v15+), queue/timeout selection, per-record commit/rollback error handling, admin execution context, and monitoring/log locations.

Quick Start

Use the frappe-syntax-scheduler skill to configure scheduler_events for daily and cron jobs, enqueue heavy work into the correct queues, and apply deduplication and error-handling patterns for reliable background processing.

Frequently Asked Questions about frappe-syntax-scheduler

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

FAQPage Schema
How do I configure Frappe scheduler_events for cron jobs in hooks.py?

To configure Frappe scheduler_events for cron jobs, define correct scheduling patterns in your hooks.py file using standard cron syntax for precise timing. You must run bench migrate after editing scheduler_events to ensure changes are registered and applied reliably.

How do I prevent duplicate background jobs in Frappe v15+?

To prevent duplicate background jobs in Frappe v15+, implement job deduplication by assigning a unique job_id and checking it with the is_job_enqueued function. This ensures only one instance of the task runs at a time, avoiding overlapping executions.

What is the correct way to enqueue background jobs in Frappe?

The correct way to enqueue background jobs in Frappe is using frappe.enqueue or frappe.enqueue_doc for async processing. You must select the appropriate queue and timeout settings to ensure heavy work is delegated safely without blocking the main thread.

How do I handle errors and commits in Frappe scheduled functions?

To handle errors and commits in Frappe scheduled functions, implement per-record commit and rollback logic within your execution loop. This isolates failures, ensuring one record error does not halt the entire job and safe database states are maintained.

Does Frappe support admin-executed scheduled functions across versions?

Frappe supports admin-executed scheduled functions across versions 14 to 16. Configuring these functions requires careful attention to admin execution context and queue selection to ensure tasks run reliably under the correct administrative permissions.

What are the limitations of Frappe scheduler_events configuration?

A key limitation of Frappe scheduler_events configuration is the strict requirement to run bench migrate after edits, without which changes silently fail to apply. Additionally, older Frappe versions lack built-in job deduplication features available in v15+.