Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when building a val that runs on a schedule — periodic jobs, recurring tasks, polling, cron jobs, monitoring, alerting. Covers the interval handler signature, cron expressions, the UTC timezone constraint, and the `lastRunAt` pattern for detecting new items since the previous run.
.claude/skills/hashgraph-online-cron-and-intervals/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -64% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -46% | 0% |
Interval vals (fileType: "interval") run on a recurring schedule defined by a cron expression. Use them for polling external APIs, sending reminders, running cleanups, generating reports, or any work that should happen on a clock rather than in response to a request.
ts// Learn more: https://docs.val.town/vals/cron/ export default async function (interval: Interval) { // interval.lastRunAt: Date | undefined console.log(interval); }
The file must have an export — export default for the handler.
Cron expressions run in UTC. Convert any human-readable schedule (e.g. "9am Eastern") to UTC before writing the cron expression. Daylight savings is not handled — pick a UTC time that's close enough year-round.
lastRunAt patterninterval.lastRunAt is the timestamp of the previous successful run (or undefined on the first run). Use it to fetch only items created since the last run, instead of re-scanning everything:
tsexport default async function (interval: Interval) { const since = interval.lastRunAt ?? new Date(Date.now() - 24 * 60 * 60 * 1000); const newItems = await fetchItemsSince(since); for (const item of newItems) { await handle(item); } }
This makes the val idempotent against missed runs and avoids reprocessing.
read_interval_settings — fetch the current cron expression and active state of an interval file.write_interval_settings — change the cron expression or pause/resume an interval.For simple scheduled jobs, create a new val with a single interval-type file directly — no template needed. Templates are for more complex shapes (dashboards, AI agents, webhook + UI combos).
After editing an interval val, use run_file to invoke the handler manually instead of waiting for the next scheduled run.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | pass→pass | 25,942 | 17,811 | -31% | 1 | 1 | 0% | 2,470 | 2,631 | +7% | 0 | 0 | — |
case-02 | fail→pass | 17,582 | 9,798 | -44% | 1 | 1 | 0% | 2,309 | 2,288 | -1% | 0 | 0 | — |
case-03 | fail→pass | 7,802 | 10,871 | +39% | 1 | 1 | 0% | 1,417 | 1,430 | +1% | 0 | 0 | — |
case-01 | fail→pass | 17,247 | 11,212 | -35% | 1 | 1 | 0% | 2,355 | 1,882 | -20% | 0 | 0 | — |
case-04 | pass→pass | 12,397 | 4,145 | -67% | 1 | 1 | 0% | 2,087 | 697 | -67% | 0 | 0 | — |
case-05 | pass→pass | 12,616 | 7,796 | -38% | 1 | 1 | 0% | 1,214 | 860 | -29% | 0 | 0 | — |
case-06 | pass→pass | 14,116 | 5,854 | -59% | 1 | 1 | 0% | 1,472 | 1,259 | -14% | 0 | 0 | — |
case-07 | pass→pass | 12,425 | 11,296 | -9% | 1 | 1 | 0% | 1,962 | 1,157 | -41% | 0 | 0 | — |
case-08 | pass→pass | 12,496 | 11,071 | -11% | 1 | 1 | 0% | 1,657 | 1,379 | -17% | 0 | 0 | — |
case-10 | fail→pass | 11,517 | 2,474 | -79% | 1 | 1 | 0% | 1,985 | 713 | -64% | 0 | 0 | — |
case-11 | fail→fail | 18,928 | 14,003 | -26% | 1 | 1 | 0% | 2,338 | 1,854 | -21% | 0 | 0 | — |
case-12 | pass→pass | 12,511 | 8,922 | -29% | 1 | 1 | 0% | 1,127 | 1,209 | +7% | 0 | 0 | — |
case-13 | fail→pass | 14,764 | 6,947 | -53% | 1 | 1 | 0% | 1,411 | 765 | -46% | 0 | 0 | — |
case-14 | pass→pass | 10,720 | 3,925 | -63% | 1 | 1 | 0% | 1,395 | 946 | -32% | 0 | 0 | — |
case-15 | pass→pass | 11,410 | 8,679 | -24% | 1 | 1 | 0% | 1,027 | 1,139 | +11% | 0 | 0 | — |
case-16 | fail→pass | 15,635 | 2,568 | -84% | 1 | 1 | 0% | 2,871 | 779 | -73% | 0 | 0 | — |
case-17 | pass→pass | 13,955 | 7,039 | -50% | 1 | 1 | 0% | 1,890 | 1,744 | -8% | 0 | 0 | — |
case-18 | pass→pass | 11,472 | 12,931 | +13% | 1 | 1 | 0% | 1,857 | 1,500 | -19% | 0 | 0 | — |
case-19 | fail→pass | 24,435 | 5,598 | -77% | 1 | 1 | 0% | 3,249 | 760 | -77% | 0 | 0 | — |
case-20 | pass→pass | 13,255 | 12,126 | -9% | 1 | 1 | 0% | 1,398 | 1,670 | +19% | 0 | 0 | — |
case-21 | fail→pass | 14,982 | 10,203 | -32% | 1 | 1 | 0% | 1,830 | 2,157 | +18% | 0 | 0 | — |
case-22 | pass→pass | 13,031 | 9,178 | -30% | 1 | 1 | 0% | 1,427 | 1,303 | -9% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +36 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.