Langsung ke konten
Skillpedia
Otomatisasi25k · #10105

nocobase-app-plugin-scheduler

Fungsinya

Skill ini memandu pengembang membangun tugas terjadwal dalam aplikasi NocoBase 3, dengan status yang terlihat oleh administrator bisnis. Cocok untuk tim yang perlu memantau pekerjaan berulang.

Kapan dipakai

  • ✓Saat administrator bisnis perlu melihat dan melacak tugas berulang di aplikasi.
  • ✓Saat Anda ingin mendefinisikan jadwal dalam kode dengan status yang terlihat di UI.
  • ✓Saat tugas latar belakang tidak memerlukan visibilitas UI, dan Anda perlu memilih mekanisme pekerjaan lain.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-scheduler/skills/nocobase-app-plugin-scheduler/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bisakah Anda menambahkan tugas malam hari yang mengarsipkan pesanan lama, dan membiarkan admin melihat run-nya serta mematikannya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

AI mendefinisikan jadwal dan logika eksekusinya dalam kode, mendaftarkan target, serta melaporkan status akhir. Scheduler menyimpan riwayat pemicu agar administrator bisa melacak setiap run.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah setiap pekerjaan latar belakang harus memakai Scheduler?

Tidak. Skill menyatakan tugas yang tidak memerlukan visibilitas UI tidak perlu memakainya.

Siapa yang bisa mengaktifkan atau menonaktifkan tugas?

Administrator bisnis yang berwenang, melalui UI.

Apakah Scheduler berisi logika bisnis?

Tidak. Aplikasi memiliki logikanya, dan Scheduler menangani penjadwalan serta status.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
25k
Peringkat
#10105
Lisensi
—
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa