scheduling
Skill8 starsChanged 9 months agoMITView on GitHub
This skill should be used when the user asks about "Effect Schedule", "retry schedules", "repetition", "Schedule.exponential", "Schedule.spaced", "Schedule.recurs", "cron scheduling", "backoff strategy", "schedule combinators", "Effect.repeat", "Effect.retry", "polling", or needs to understand how Effect handles scheduled operations and retry policies.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mariagorskikh/open-instincttheir own version, first seen Oct 5, 2026
- last9/mithaitheir own version, first seen Jun 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- mariagorskikh/open-instinct★ 219same name
- last9/mithai★ 18same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- references/llms-full.txtllms.txt
- api-doc-lookupSkill
- batching-cachingSkill
- code-styleSkill
- concurrencySkill
- configurationSkill
- data-typesSkill
- effect-aiSkill
- effect-coreSkill
- error-managementSkill
- ObservabilitySkill
- pattern-matchingSkill
- platformSkill
- requirementsSkill
- resourcesSkill
- runtimeSkill
- schemaSkill
- sinksSkill
- stateSkill
- streamsSkill
- testingSkill
- traitsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 256
Always add recurs limit: - Avoid infinite retries
- Distinctive: line 258
Cap exponential backoff: - Use upTo() for max delay
- Distinctive: line 259
Log retry attempts: - Use tapInput for visibility
- Distinctive: line 266
Search for these sections:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scheduling in Effect
Overview
Effect's Schedule type describes patterns for:
- Retrying failed operations
- Repeating successful operations
- Polling at intervals
- Backoff strategies for resilience
Schedule<Out, In, Requirements>;
// ^^^ ^^ Output and input typesBuilt-In Schedules
Fixed Intervals
import { Schedule } from "effect";
const everySecond = Schedule.spaced("1 second");
const fixed = Schedule.fixed("500 millis");Recurrence Limits
const fiveTimes = Schedule.recurs(5);
const once = Schedule.once;
const forever = Schedule.forever;Exponential Backoff
const exponential = Schedule.exponential("100 millis");
const capped = Schedule.exponential("100 millis").pipe(Schedule.upTo("30 seconds"));
const jittered = Schedule.exponential("100 millis").pipe(Schedule.jittered);Time-Based Limits
const forOneMinute = Schedule.spaced("1 second").pipe(Schedule.upTo("1 minute"));
const untilSuccess = Schedule.recurWhile((result) => result.status === "pending");Using Schedules
Effect.retry - Retry on Failure
const resilientFetch = fetchData().pipe(
Effect.retry(Schedule.exponential("1 second").pipe(Schedule.compose(Schedule.recurs(5)))),
);Effect.repeat - Repeat on Success
const polling = checkStatus().pipe(Effect.repeat(Schedule.spaced("5 seconds")));Effect.schedule - Full Control
const scheduled = effect.pipe(Effect.schedule(mySchedule));Schedule Combinators
Composing Schedules
const exponentialWithLimit = Schedule.exponential("1 second").pipe(Schedule.compose(Schedule.recurs(10)));
const eitherSchedule = Schedule.union(Schedule.spaced("1 second"), Schedule.recurs(5));Adding Jitter
const jittered = Schedule.exponential("1 second").pipe(Schedule.jittered);
const customJitter = Schedule.exponential("1 second").pipe(Schedule.jittered({ min: 0.8, max: 1.2 }));Delaying First Execution
const delayed = Schedule.spaced("1 second").pipe(Schedule.delayed(() => "5 seconds"));Resetting Schedule
const resetting = Schedule.exponential("1 second").pipe(Schedule.resetAfter("1 minute"));Conditional Retrying
Retry While Condition
// Use Match.tag for error type checking in predicates
const retryTransient = effect.pipe(
Effect.retry({
schedule: Schedule.exponential("1 second"),
while: (error) =>
Match.value(error).pipe(
Match.tag("TransientError", () => true),
Match.orElse(() => false),
),
}),
);Retry Until Condition
const retryUntilFatal = effect.pipe(
Effect.retry({
schedule: Schedule.recurs(10),
until: (error) =>
Match.value(error).pipe(
Match.tag("FatalError", () => true),
Match.orElse(() => false),
),
}),
);Cron Scheduling
import { Cron } from "effect";
const daily = Cron.parse("0 0 * * *");
const hourly = Cron.parse("0 * * * *");
const cronSchedule = Schedule.cron(daily);Schedule Outputs
Schedules can produce values:
const withElapsed = Schedule.elapsed;
const withCount = Schedule.count;
const collecting = Schedule.collectAll<number>();Using Schedule Output
const [result, elapsed] =
yield * effect.pipe(Effect.retry(Schedule.exponential("1 second").pipe(Schedule.compose(Schedule.elapsed))));
console.log(`Took ${elapsed}ms after retries`);Common Patterns
API Retry with Backoff
const apiCall = fetchFromApi().pipe(
Effect.retry(
Schedule.exponential("500 millis").pipe(
Schedule.jittered,
Schedule.compose(Schedule.recurs(5)),
Schedule.upTo("30 seconds"),
),
),
);Polling with Timeout
const poll = checkJobStatus(jobId).pipe(
Effect.repeat(Schedule.spaced("2 seconds").pipe(Schedule.upTo("5 minutes"))),
Effect.timeout("5 minutes"),
);Circuit Breaker Pattern
const circuitBreaker = (effect: Effect.Effect<A, E>) => {
let failures = 0;
const maxFailures = 5;
const resetTimeout = "30 seconds";
return effect.pipe(
Effect.retry(
Schedule.exponential("1 second").pipe(
Schedule.compose(Schedule.recurs(3)),
Schedule.tapOutput(() =>
Effect.sync(() => {
failures++;
}),
),
),
),
);
};Retry with Logging
const retryWithLogs = effect.pipe(
Effect.retry(
Schedule.exponential("1 second").pipe(
Schedule.compose(Schedule.recurs(5)),
Schedule.tapInput((error) => Effect.log(`Retrying after error: ${error}`)),
),
),
);Schedule Reference
| Schedule | Pattern |
Schedule.forever | Never stops |
Schedule.once | Single execution |
Schedule.recurs(n) | Exactly n times |
Schedule.spaced(d) | Fixed delay d |
Schedule.fixed(d) | Fixed interval from start |
Schedule.exponential(d) | d, 2d, 4d, 8d... |
Schedule.fibonacci(d) | d, d, 2d, 3d, 5d... |
Schedule.linear(d) | d, 2d, 3d, 4d... |
Best Practices
- Always add recurs limit - Avoid infinite retries
- Use jitter for distributed systems - Prevents thundering herd
- Cap exponential backoff - Use upTo() for max delay
- Log retry attempts - Use tapInput for visibility
- Different schedules for different errors - Transient vs permanent
Additional Resources
For comprehensive scheduling documentation, consult ${CLAUDE_PLUGIN_ROOT}/references/llms-full.txt.
Search for these sections:
- "Built-In Schedules" for schedule types
- "Schedule Combinators" for composition
- "Repetition" for repeat patterns
- "Retrying" for retry patterns
- "Cron" for cron expressions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

