मुख्य सामग्री पर जाएँ
Skillpedia
ऑटोमेशन31k · #9297

cron-scheduler

यह क्या करती है

यह स्किल आपके एजेंट के दोहराए जाने वाले कामों की योजना बनाती है, जैसे रोज़ की रिपोर्ट या साप्ताहिक जांच। यह जॉब्स के बीच अंतर रखती है, शांत घंटों का ध्यान रखती है और हर नतीजा तारीख वाली रिपोर्ट के रूप में सेव करती है।

कब इस्तेमाल करें

  • ✓जब आप चाहें कि रोज़ की रिपोर्ट जैसा दोहराने वाला काम शेड्यूल पर चले।
  • ✓जब आप अपने शांत घंटों में सूचनाएँ न चाहें।
  • ✓जब आपके कई शेड्यूल्ड जॉब हों और आप उनके आपस में टकराने से बचना चाहें।

Skill का लिंक

https://github.com/garrytan/gbrain/blob/master/plugin/skills/cron-scheduler/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/garrytan/gbrain/blob/master/plugin/skills/cron-scheduler/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हर सुबह 7 बजे रोज़ की रिपोर्ट शेड्यूल कीजिए, और रात में मेरे शांत घंटों के दौरान आने वाले संदेश रोके रखिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट शेड्यूल को दूसरे जॉब्स से टकराव के लिए जांचता है, और ज़रूरत हो तो खाली समय सुझाता है। हर जॉब एक छोटी निर्देश फ़ाइल चलाता है, और उसका नतीजा तारीख-समय वाली रिपोर्ट के रूप में सेव होता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Cron Scheduler

Convention: See skills/conventions/test-before-bulk.md — test every cron job on 3-5 items first.

Contract

This skill guarantees:

  • Schedule staggering: max 1 job per 5-minute slot, no collisions
  • Quiet hours gating: timezone-aware, with user-awake override
  • Thin job prompts: jobs say "Read skills/X/SKILL.md and run it" (no inline 3000-word prompts)
  • Idempotency: jobs can run twice without duplicate side effects
  • Results saved as reports: reports/{job-name}/{YYYY-MM-DD-HHMM}.md
  • One entry point: every job, workspace script and hook calls gbrain through one wrapper that sets GBRAIN_HOME and keeps stderr and the exit code (the wrapper)

Phases

  1. Define job. Name, schedule (cron expression), skill to run, timeout.
  2. Validate schedule. Check no collision with existing jobs (5-minute offset rule).
    • Slots: :05, :10, :15, :20, :25, :30, :35, :40, :45, :50
    • If collision detected, suggest the next available slot
  3. Check quiet hours. Default: 11 PM - 8 AM local time.
    • Override: user-awake flag (if user is active, quiet hours suspended)
    • During quiet hours: save output to held queue
    • Morning contact releases the backlog
  4. Register with host scheduler. OpenClaw cron, Railway cron, crontab, or process manager. Each registered entry should execute via Minions, not agentTurn. See skills/conventions/cron-via-minions.md for the rewrite pattern (PGLite uses --follow, Postgres uses fire-and-forget + --idempotency-key on the cycle slot). GBrain's v0.11.0 migration auto-rewrites entries for built-in handlers; host-specific handlers need a code-level registration per docs/guides/plugin-handlers.md.
  5. Write thin prompt. Job prompt is one line: "Read skills/{name}/SKILL.md and run it."
  6. Call gbrain through the wrapper. Cron runs with another HOME and environment than your shell, so a bare gbrain (or bun run src/cli.ts) can find no database (every lookup silently empty) or act as a second host (refresh_not_owner). Register gbrain-run <args>, the wrapper in cron-schedule.md: it sets GBRAIN_HOME (never HOME), loads the brain's env file and runs the installed binary. Log stderr to a file, check the exit code, keep hook output off stdout, and give each call a timeout of at least 10 s. The lines below write gbrain-run; doctor prints the bare command. gbrain doctor --only cron_gbrain_home warns about any crontab line or script that runs src/cli.ts directly or calls gbrain without the brain's GBRAIN_HOME.

Idempotency Requirement

Every cron job MUST be idempotent:

  • Running the same job twice produces the same result (no duplicate pages, no duplicate timeline entries)
  • Use checkpoint state files to track progress and resume interrupted runs
  • Check for existing output before creating new output

Output Format

Job configuration saved. Report: "Job '{name}' scheduled at {cron expression}. Next run: {time}."

Multi-source brains: use sync --all, not per-source entries

When the brain has 2+ active sources (anything gbrain sources list shows with a non-null local_path that isn't archived), use one consolidated cron line instead of N per-source entries.

Preferred (multi-source):

*/5 * * * * gbrain-run sync --all --parallel 4 --workers 4 --skip-failed >> /tmp/gbrain-cron.log 2>&1

This replaces N per-source lines AND auto-picks-up future sources without a crontab edit. Concurrency budget: parallel × workers × 2 ≈ 32 connections during the wave (each per-file worker opens its own 2-connection pool). Stay under your Postgres max_connections setting.

Avoid (legacy): separate gbrain sync --source default and gbrain sync --source zion-brain entries staggered by 5 minutes. They require manual deconfliction every time a new source is added, and a slow source can race a fast source on the legacy global gbrain-sync lock (v0.40.3.0+ uses per-source gbrain-sync:<sourceId> locks but the per-source cron pattern doesn't benefit from the parallelism that --all --parallel actually delivers).

gbrain doctor surfaces the recommended line as a sync_consolidation check whenever it detects 2+ active sources. Paste-ready from there.

Managed br

अक्सर पूछे जाने वाले सवाल

शांत घंटे क्या हैं?

डिफ़ॉल्ट रूप से ये रात 11 बजे से सुबह 8 बजे तक, आपके स्थानीय समय पर, चलते हैं और नतीजे सुबह तक रुके रहते हैं।

क्या मैं शांत घंटे बदल सकता हूँ?

हाँ। अगर आप सक्रिय हैं, तो शांत घंटों की सेटिंग रोक दी जाती है।

क्या कोई जॉब दो बार चलकर समस्या करेगा?

जॉब्स ऐसे बने हैं कि दो बार चलने पर डुप्लीकेट नतीजे नहीं बनते।

जानकारी

लेखक का मूल विवरण

Schedule management with staggering, quiet hours, and wake-up override. Validates schedules, prevents collisions, and gates delivery during quiet hours.

repo: garrytan/gbrain

लोकप्रियता

GitHub स्टार
31k
रैंकिंग में स्थान
#9297
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

gbrain

31k

यह आपके एजेंट को लोगों, प्रोजेक्ट और फ़ैसलों के बारे में तथ्य खोजने के लिए साझा कंपनी ज्ञान ब्रेन में खोजने और उसमें स्थायी नोट सहेजने देती है।

लेखन और डॉक्यूमेंटरिसर्च

brain-ingest-gate

31k

यह आपके एजेंट को नई सामग्री जोड़ने से पहले मौजूदा ज्ञान ब्रेन से जाँचने देती है, ताकि डुप्लिकेट न बनें और नामित इकाइयाँ पहले सुलझें।

लेखन और डॉक्यूमेंटरिसर्च

brain-link-discipline

31k

यह सुनिश्चित करती है कि आपका एजेंट हर उस ब्रेन पेज का काम करने वाला लिंक उसी संदेश में दे, जिसकी वह रिपोर्ट करता है, ताकि आप उसे तुरंत खोल सकें।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

brain-ops

31k

यह आपके एजेंट को ज्ञान ब्रेन की मुख्य दिनचर्या देती है: पहले मौजूदा संदर्भ जाँचना, स्पष्ट नोट उनके स्रोत के साथ सहेजना, और संबंधित पेज जोड़ना।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills