frappe-impl-scheduler

Implement Frappe scheduled tasks and background jobs with scheduler_events and frappe.enqueue.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents common Frappe scheduler and background job failures where scheduled tasks silently don’t run or jobs time out, duplicate, or break production reliability.

Core Features & Use Cases

  • Choose the correct trigger mechanism: implement fixed-interval jobs with scheduler_events (via hooks.py) or user/code-triggered work with frappe.enqueue().
  • Select the right queue and timeouts: apply queue duration rules (including *_long scheduler event types) and explicitly set queue= for frappe.enqueue.
  • Prevent duplicates and enforce safety: deduplicate user-triggered jobs using job_id + is_job_enqueued, isolate failures with per-record try/except, and ensure data availability with correct commit/enqueue timing.

Quick Start

Ask the AI to implement a daily cleanup that runs via scheduler_events and enqueue any heavy work to the long queue, including deduplication, batching commits, and error logging, for Frappe v14-v16.

Frequently Asked Questions about frappe-impl-scheduler

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

FAQPage Schema
How do I prevent duplicate background jobs in Frappe when using frappe.enqueue?

Prevent duplicate Frappe background jobs by assigning a unique job_id to frappe.enqueue and checking is_job_enqueued before queueing. This deduplication behavior ensures user-triggered tasks do not overlap or break production reliability across v14-v16.

Why does my scheduled task silently fail to run in Frappe?

Frappe scheduled tasks silently fail when hooks.py scheduler_events configuration is incorrect or bench migrate is skipped after changes. Ensure you select the right scheduler event type and run bench migrate to register the job properly.

How do I handle long-running tasks in Frappe without timing out?

Handle long-running Frappe tasks by enqueueing them to the long or *_long queue with explicit timeouts. For extensive processing, implement job chunking and self-chaining to prevent timeouts and maintain production safety.

What is the best way to monitor Frappe scheduled jobs and background tasks?

Monitor Frappe scheduled jobs using the Scheduled Job Log and RQ Dashboard. Implementing health and alert monitoring alongside per-record try-except error logging allows you to track background task execution and catch failures quickly.

How do I safely process records in a Frappe background job without failing the entire batch?

Safely process records in a Frappe background job by wrapping individual record processing in per-record try-except blocks. Batch your database commits to ensure data availability and isolate failures without breaking the entire job queue.