Skip to content
Skillpedia
Automations25k · #10105

nocobase-app-plugin-scheduler

What it does

This skill guides developers in building scheduled tasks in a NocoBase 3 app, with their status visible to business administrators. It is for teams that need to watch recurring work.

When to use it

  • ✓When business administrators need to see and track recurring tasks in the app.
  • ✓When you want to define a schedule in code with a status visible in the UI.
  • ✓When a background task does not need UI visibility, and you need to choose a different job mechanism.

Skill link

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-scheduler/skills/nocobase-app-plugin-scheduler/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-scheduler/skills/nocobase-app-plugin-scheduler/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you add a nightly task that archives old orders, and let admins see its runs and turn it off?”

5 new skills a week. 1 minute to read.

How it works

The AI defines the schedule and its execution logic in code, registers the target, and reports the final status. Scheduler keeps the trigger history so administrators can track each run.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Develop Scheduled Tasks in an Application

Use the installed version's public exports, without importing plugin internals. The application owns business logic, schedule declarations, Providers, permissions, and deployment timing. Scheduler owns scheduling projections, trigger history, and execution state. The plugin's skills/ directory is the source of truth; do not edit the synchronized application copy under .agents/skills/.

Decide Whether to Use Scheduler

The primary reason to define tasks through Scheduler is UI observability for business administrators. Developers define schedules and execution logic in code. Business administrators use the task list and detail pages the application builds on the Scheduler API to view schedules, track individual executions, and enable or disable tasks when authorized.

Tasks that do not need to be viewed and tracked through the UI must not be managed by the Scheduler plugin. Give recurring ones a ScheduleExecutor of their own from the application's jobs service (jobExecutorServiceToken in @nocobase/app-server/jobs), and one-off background work a JobExecutor; the application development Skill describes both. For administrator-visible tasks, deliver Client registration, access permissions, meaningful task names, and accurate final execution status together; successful server-side dispatch alone is incomplete.

Then Choose the Execution Model

After deciding to use Scheduler, choose according to business complexity:

Scenario Choice Implementation boundary
Periodic cleanup, cache refresh, a single report, or one business Service call Own target type Short operations may complete directly; hand lengthy work to a JobExecutor
A simple operation that happens hourly Own target type Cron alone is not a reason to introduce a heavier execution system
Immediate asynchronous execution JobExecutor No Cron Schedule is needed
A one-time delay, such as ten minutes after a request Queue delay No Cron Schedule is needed; JobExecutor has no delay
Another execution system with its own references, status queries, and completion protocol Own target type The same registerTarget() call, with inspect() and completion reporting for work that finishes later

Every schedule points at a registered target; registerTarget() is the target extension surface, and there is no built-in target type. A target does not guarantee exactly-once external business effects; design business idempotency.

Read by Task

Development Loop

  1. Establish which tasks and execution records administrators need to see. Check Server/Client/CLI registration, page permissions, the application's jobs configuration (a redis adapter for more than one instance; memory serves one process) and JobExecutorServiceProvider composition and target availability, then choose or register the target type.
  2. Implement business logic and Providers in application source, and call schedulerServiceToken.defineSchedule(definition) with an application-wide stable key from that Provider's register()/boot().
  3. Validate payload/inpu
FAQ

Should every background job use Scheduler?

No. The skill says tasks that do not need UI visibility should not use it.

Who can turn a task on or off?

Business administrators who are authorized, through the UI.

Does Scheduler contain the business logic?

No. The application owns the logic, and Scheduler handles scheduling and status.

Details

Original description by the author

Develop scheduled tasks in NocoBase 3 that business administrators need to view and track through the application UI. Define schedules in code, register the target a schedule points at, integrate execution status, and report completion. Do not use Scheduler to manage tasks that do not need UI visibility.

repo: nocobase/nocobase

Popularity

GitHub stars
25k
Ranking position
#10105
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills