/grain:grain-periodic-taskfrom grain
Schedules Grain trigger events per tenant with interval or cron expressions. Prevents duplicate triggers across nodes using CAS guards.
Ships in grain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use defperiodic from ai.obney.grain.periodic-task.interface. Declare an
interval such as {:schedule {:every 5 :duration :minutes}} or a five-field cron
schedule such as {:schedule {:cron "0 6 * * *" :timezone "UTC"}}.
The handler receives [tenant-id tick] for each domain tenant. The tick is a
java.time.Instant. Define the trigger event with defevent.
Return {:result/events [...]} to emit it or {}
to skip it. Delegate follow-up work to a processor.
Each node runs its own schedule. If only one trigger may fire per business period,
derive that period from the tick and guard the append with :result/cas. Interval
ticks start at node startup and can differ across nodes. Restart the triggers
after schedule changes. Periodic task example
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (obneyai/grain) — no native marketplace selected
npx claudepluginhub p/obneyai-grain18 skills in this plugin
/event-model-propagateDerive Grain tests for registered topology, boot validation and Allium trace links.Other plugins' skills for the same job