cron-scheduler
What it does
This skill plans recurring jobs for your agent, such as a daily report or weekly check. It spaces jobs out, respects quiet hours, and saves each result as a dated report.
When to use it
- ✓When you want a recurring task, such as a daily report, to run on a schedule.
- ✓When you want to avoid notifications during your quiet hours.
- ✓When you have several scheduled jobs and want to prevent them from clashing.
Skill link
https://github.com/garrytan/gbrain/blob/master/plugin/skills/cron-scheduler/SKILL.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Schedule a daily morning report at 7 AM, and hold any messages during my quiet hours at night.”
5 new skills a week. 1 minute to read.
How it works
The agent checks the schedule for clashes with other jobs and suggests a free time slot if needed. Each job runs a short instruction file, and its output is saved as a timestamped report.
Technical content (original SKILL.md)
Original text by the author, straight from 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_HOMEand keeps stderr and the exit code (the wrapper)
Phases
- Define job. Name, schedule (cron expression), skill to run, timeout.
- 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
- 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
- Register with host scheduler. OpenClaw cron, Railway cron, crontab, or process manager. Each registered entry should execute via Minions, not
agentTurn. Seeskills/conventions/cron-via-minions.mdfor the rewrite pattern (PGLite uses--follow, Postgres uses fire-and-forget +--idempotency-keyon the cycle slot). GBrain's v0.11.0 migration auto-rewrites entries for built-in handlers; host-specific handlers need a code-level registration perdocs/guides/plugin-handlers.md. - Write thin prompt. Job prompt is one line: "Read skills/{name}/SKILL.md and run it."
- Call gbrain through the wrapper. Cron runs with another
HOMEand environment than your shell, so a baregbrain(orbun run src/cli.ts) can find no database (every lookup silently empty) or act as a second host (refresh_not_owner). Registergbrain-run <args>, the wrapper in cron-schedule.md: it setsGBRAIN_HOME(neverHOME), 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 writegbrain-run; doctor prints the bare command.gbrain doctor --only cron_gbrain_homewarns about any crontab line or script that runssrc/cli.tsdirectly or calls gbrain without the brain'sGBRAIN_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
FAQ
What are quiet hours?
By default they run from 11 PM to 8 AM in your local time, and results wait until morning.
Can I override quiet hours?
Yes. If you are active, the quiet hours setting is suspended.
Will a job run twice and cause problems?
The jobs are designed so running twice does not create duplicate results.
Details
Original description by the author
Schedule management with staggering, quiet hours, and wake-up override. Validates schedules, prevents collisions, and gates delivery during quiet hours.
repo: garrytan/gbrain
Popularity
- GitHub stars
- 31k
- Ranking position
- #9297
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
gbrain
31kLets your agent search a shared company knowledge brain for facts about people, projects and decisions, and save durable notes to it.
brain-ingest-gate
31kChecks new content against an existing knowledge brain before it is added, to avoid duplicates and resolve named entities first.
brain-link-discipline
31kMakes sure your agent includes a working link to each brain page it reports, in the same message, so you can open it right away.
brain-ops
31kGives your agent the core routine for a knowledge brain: check existing context first, save explicit notes with their source, and link related pages.
Similar skills
knowledge-automation
394kHelps your agent set up a recurring job that brings new content into your Knowledge vault on a schedule, then checks that the job runs.
knowledge-source-ingest
394kHelps your agent keep a Knowledge vault current with new items from chat channels, feeds, or mailboxes, without re-adding what it already has.
benchmark
280kHelps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.