본문으로 건너뛰기
Skillpedia
자동화25k · #10105

nocobase-app-plugin-scheduler

하는 일

이 스킬은 NocoBase 3 앱에서 예약 작업을 만드는 개발자를 안내하며, 작업 상태를 업무 관리자에게 보여 줍니다. 반복 작업을 지켜봐야 하는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓업무 관리자가 앱에서 반복 작업을 보고 추적해야 할 때.
  • ✓코드로 일정을 정의하고 상태를 UI에 보이게 하고 싶을 때.
  • ✓백그라운드 작업이 UI 가시성이 필요 없어 다른 작업 방식을 골라야 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“매일 밤 오래된 주문을 보관하는 작업을 추가하고, 관리자가 실행 기록을 보고 끌 수 있게 해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 코드에서 일정과 실행 로직을 정의하고, 대상을 등록한 뒤 최종 상태를 보고합니다. Scheduler는 트리거 기록을 보관해 관리자가 각 실행을 추적할 수 있게 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

모든 백그라운드 작업에 Scheduler를 써야 하나요?

아니요. UI 가시성이 필요 없는 작업에는 쓰지 말라고 스킬이 말합니다.

누가 작업을 켜거나 끌 수 있나요?

UI를 통해, 권한이 부여된 업무 관리자가 할 수 있습니다.

Scheduler에 업무 로직이 들어 있나요?

아니요. 로직은 애플리케이션이 소유하며, Scheduler는 일정과 상태를 담당합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
25k
순위
#10105
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬