Guide · Agent skill
How to use the Cron Scheduler agent skill for GBrain
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cron-scheduler skill teaches an AI agent how to set up recurring background jobs for the GBrain knowledge system. It checks that new jobs do not collide on a 5-minute slot, holds output during quiet hours, and registers the jobs with a host scheduler such as crontab or Railway cron. This guide explains what the skill does, how to install it, how to ask for it in plain language, and the safety points to check before anything gets scheduled.
Quick start
- 1Install GBrain and the wrapper. Confirm GBrain is installed with its gbrain-run wrapper command and that its database (Postgres or PGLite) is working. The skill assumes this setup and is not useful on its own.
- 2Install the skill. Unzip the cron-scheduler download into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
- 3Ask for a job in plain language. Describe the job, its schedule and the skill it should run, for example: 'Schedule a job that syncs my GBrain sources every five minutes.'
- 4Review the proposed schedule. Check that the slot does not collide with an existing job and that quiet hours are handled as you expect. Confirm the command uses gbrain-run and not a bare gbrain call.
- 5Register and verify. Let the agent add the entry to your host scheduler, then run gbrain doctor --only cron_gbrain_home to catch unsafe lines and check the log file for errors.
What the cron-scheduler skill makes the agent do
Agent skills are instruction packages that an AI assistant loads when a request matches them. This one covers scheduling for GBrain, a knowledge system. Without it, an agent has no set process for adding recurring jobs, so entries can collide or run at bad times.
When the skill is active, the agent works through defined phases: define the job (name, cron expression, skill to run, timeout), validate the schedule, check quiet hours, register the job with the host scheduler, and write a short job prompt that points to another skill.
- Schedule staggering: at most one job per 5-minute slot, using :05, :10, :15 up to :50.
- If a collision is found, the agent suggests the next available slot.
- Quiet hours: 11 PM to 8 AM local time by default, timezone-aware, with a user-awake override.
- During quiet hours, output goes to a held queue that is released on morning contact.
- Idempotent jobs: running a job twice should not create duplicate pages or timeline entries.
- Results saved as reports at reports/{job-name}/{YYYY-MM-DD-HHMM}.md.
Install the cron-scheduler skill
Download the cron-scheduler ZIP from this page and unzip it. The skill is delivered as a folder containing SKILL.md. Put that folder in one of two places: ~/.claude/skills/ to make it available across your projects, or the .claude/skills/ folder inside a single project to limit it to that project.
If you use the Claude apps instead, upload the ZIP under Settings, then Capabilities, then Skills.
- Personal install: unzip into ~/.claude/skills/.
- Project install: unzip into the project's .claude/skills/ folder.
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP.
Ask for the skill with natural requests
The skill loads when your request matches its trigger phrases. You do not need to name the skill. Plain requests work, and the trigger list includes the phrases below.
The skill is marked as mutating, so it can write to pages and reports. Review what it proposes before you approve a change to scheduler configuration.
- 'Schedule a job that syncs my GBrain sources every five minutes.'
- 'Add a cron job for weekly maintenance and keep it out of quiet hours.'
- 'What jobs are running?'
- 'Check the quiet hours setting before adding this job.'
Set up a multi-source brain with one consolidated cron line
If your brain has two or more active sources, the skill recommends one consolidated line instead of separate entries per source. This line picks up new sources automatically, so you do not need to edit the crontab each time a source is added.
Keep the connection count within your Postgres max_connections setting. The source gives the budget as parallel × workers × 2, which is about 32 connections during a wave with the flags below. If you run gbrain doctor, it can print this line for you.
- Avoid separate per-source entries staggered by five minutes; they need manual deconfliction each time a source is added.
- On a managed brain, the sync line differs. Check the mode with gbrain sources writer status --json first.
*/5 * * * * gbrain-run sync --all --parallel 4 --workers 4 --skip-failed >> /tmp/gbrain-cron.log 2>&1Call GBrain safely from cron
Cron runs with a different HOME and environment than your shell. A bare gbrain command can find no database, and every lookup then comes back empty without an error. The skill therefore registers gbrain-run, a wrapper that sets GBRAIN_HOME, loads the brain's env file and runs the installed binary.
Log stderr to a file, check exit codes, keep hook output off stdout, and give each call a timeout of at least 10 seconds. To catch unsafe lines, run gbrain doctor --only cron_gbrain_home, which warns about crontab lines or scripts that call src/cli.ts directly or skip GBRAIN_HOME.
- Every job should be idempotent and use checkpoint state files so interrupted runs can resume.
- Each registered entry should run through Minions rather than agentTurn, following the cron-via-minions convention the skill references.
- Avoid overlapping schedules. If sync reports sync_in_progress or lock_busy, widen the interval or stagger the job instead of adding another schedule.
Review the skill before you rely on it
The skill does not run scripts and does not use the network, according to the listing. It does modify files: it writes job configuration, reports and pages, and it edits the crontab or scheduler configuration when you ask it to register a job.
A wrong crontab entry can silently point at an empty database or run duplicate work, so check each line before it goes live. The skill also expects you to follow the referenced GBrain docs and convention files for full instructions.
- Read the proposed crontab line before it is installed.
- Test each new cron job on three to five items first, following the test-before-bulk convention.
- Confirm that GBrain and the gbrain-run wrapper are already installed.
What people use it for
- Syncing several GBrain sources on one consolidated cron line, so new sources are picked up without a crontab edit.
- Scheduling weekly or nightly maintenance jobs that hold their output during quiet hours until you are awake.
- Listing the recurring jobs currently registered for a GBrain brain when you need to audit them.
- Adding a new scheduled job while keeping it off the 5-minute slots already in use.
Frequently asked questions
Is the cron-scheduler skill free to use?
The listing states the skill is released under the MIT licence. Check the licence file in the GBrain repository for the full terms before you reuse or redistribute it.
What do I need before installing the cron-scheduler skill?
You need GBrain installed with its gbrain-run wrapper, a host scheduler such as crontab, Railway cron, OpenClaw cron or a process manager, and a Postgres or PGLite database. The skill assumes GBrain is already set up and is not useful on its own.
Where do I put the skill files after downloading?
Unzip the download into ~/.claude/skills/ for all your projects, or into a project's .claude/skills/ folder for one project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Why does the skill use gbrain-run instead of gbrain?
Cron runs with a different HOME and environment from your shell, so a bare gbrain command can find no database and return empty results. The gbrain-run wrapper sets GBRAIN_HOME, loads the brain's env file and runs the installed binary.
Will the skill run jobs during quiet hours?
By default, quiet hours run from 11 PM to 8 AM local time. During them, output is saved to a held queue and released on morning contact, unless the user-awake flag suspends quiet hours.
Does the skill run scripts or access the network?
According to the listing, it does not run scripts and does not use the network. It is marked as mutating, so it can write to pages and reports and change scheduler configuration.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits developers and operators who already run GBrain on a server and want scheduled syncs or maintenance that respect quiet hours and avoid slot collisions. Skip it if you have never run a cron job, do not have GBrain installed, or want changes to your crontab and database without reviewing them first.
Download the skill