nocobase-app-plugin-scheduler
ما الذي تفعله
توجه هذه المهارة المطورين إلى بناء مهام مجدولة في تطبيق NocoBase 3، مع ظهور حالتها لمسؤولي الأعمال. وهي مخصصة للفرق التي تحتاج إلى متابعة الأعمال المتكررة.
متى تستخدمها
- ✓عندما يحتاج مسؤولو الأعمال إلى رؤية المهام المتكررة في التطبيق وتتبعها.
- ✓عندما تريد تعريف جدول زمني في الشيفرة بحالة تظهر في الواجهة.
- ✓عندما لا تحتاج مهمة الخلفية إلى ظهور في الواجهة، وتحتاج إلى اختيار آلية أخرى للمهام.
رابط المهارة
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-scheduler/skills/nocobase-app-plugin-scheduler/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك إضافة مهمة ليلية تؤرشف الطلبات القديمة، وتسمح للمسؤولين برؤية تشغيلاتها وإيقافها؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يعرّف الذكاء الاصطناعي الجدول الزمني ومنطق التنفيذ في الشيفرة، ويسجل الهدف، ويبلغ بالحالة النهائية. ويحتفظ 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
- To create or change a schedule, read Definitions, Registration, and Synchronization.
- To register or review a target, hand its work to a
JobExecutor, report completion, or diagnose a historical occurrence after retargeting, read Target Extensions and Execution Protocol. - To integrate or review the UI/API and permissions, interpret status, or diagnose missing definitions, read Operations and Verification, including the complete management route table, separate status dimensions, and application identity checks.
Development Loop
- Establish which tasks and execution records administrators need to see. Check Server/Client/CLI registration, page permissions, the application's
jobsconfiguration (aredisadapter for more than one instance;memoryserves one process) andJobExecutorServiceProvidercomposition and target availability, then choose or register the target type. - Implement business logic and Providers in application source, and call
schedulerServiceToken.defineSchedule(definition)with an application-wide stable key from that Provider'sregister()/boot(). - Validate payload/inpu
الأسئلة الشائعة
هل يجب أن تستخدم كل مهام الخلفية Scheduler؟
لا. تنص المهارة على أن المهام التي لا تحتاج إلى ظهور في الواجهة لا ينبغي أن تستخدمه.
من يستطيع تشغيل المهمة أو إيقافها؟
مسؤولو الأعمال المصرح لهم عبر الواجهة.
هل يحتوي 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
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
nocobase-app-development
25kيساعد وكيلك على بناء صفحات ومسارات وبيانات وصلاحيات واختبارات لتطبيق أعمال كامل على NocoBase 3.
shadcn
25kيساعد وكيلك على إيجاد مكونات shadcn/ui وإضافتها وإصلاحها وتنسيقها في مشروع ويب، باستخدام وثائقها الرسمية وسجلاتها.
nocobase-app-plugin-development
25kيساعد وكيلك على إنشاء إضافات NocoBase 3 وصيانتها داخل تطبيق موجود، بما في ذلك أجزاء الخادم والعميل وقاعدة البيانات والتسجيل.
nocobase-app-upgrade
25kيساعد وكيلك على ترقية تطبيق NocoBase إلى إصدار أحدث من القالب، فيأخذ تغييرات القالب ويحتفظ بعملك الخاص.
مهارات مشابهة
knowledge-automation
394kيساعد وكيلك على إعداد مهمة متكررة تضيف المحتوى الجديد إلى خزنة Knowledge حسب جدول زمني، ثم يتحقق من أنها تعمل.
knowledge-source-ingest
394kيساعد وكيلك على إبقاء خزنة المعرفة محدّثة بالعناصر الجديدة من قنوات الدردشة أو الخلاصات أو صناديق البريد، دون إعادة إضافة ما لديه.
benchmark
280kيساعد وكيلك على قياس سرعة الشيفرة وأدائها، ويفيد في التأكد من أن الأشياء سريعة وفي إيجاد مشكلات البطء.