npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oiyonet/cron-guard

v1.0.0

Published

Preconditioned task scheduler & routine heartbeat guard for autonomous AI agents. 100% zero-dependency.

Readme

@oiyonet/cron-guard

npm version License: MIT Powered by OIYO

Preconditioned task scheduler & routine heartbeat guard for autonomous AI agents. 100% zero-dependency.

Engineered by OIYO Lab to stop background cron jobs from colliding with active coding agents, stomping uncommitted git edits, or failing blindly.


🌟 Why Preconditioned Scheduling?

Standard cron daemons run blind:

  1. Collision with Inflight Agents: A cron triggers while an agent is modifying files, corrupting worktrees.
  2. Dirty Tree Stomping: Scheduled tasks try to commit or rebase when the working tree is dirty.
  3. Flapping / Retries: Repeated execution during transient failures causes cascading outages.

@oiyonet/cron-guard introduces Precondition Guards. A task only runs if its explicit preconditions pass (--require-clean, --require-no-lock, --min-interval). If unmet, the job cleanly skips and records heartbeat telemetry.


📦 Installation

# Global CLI
npm install -g @oiyonet/cron-guard

# Or run via npx
npx @oiyonet/cron-guard status

🚀 CLI Commands

1. Run a Scheduled Job with Precondition Verification

cron-guard run --job daily-traffic --cmd "node scripts/traffic.mjs" --require-clean --require-no-lock --min-interval 60
  • If an agent is actively claiming tasks in .agents/ledger.jsonl: SKIPPED (prevents collision).
  • If uncommitted git files exist: SKIPPED (prevents stomping).
  • If run less than 60 minutes ago: SKIPPED (prevents flapping).
  • Otherwise: SUCCESS (runs cleanly and records execution duration).

2. Check Preconditions (Dry Run)

cron-guard check --job daily-traffic --require-clean --require-no-lock

3. Inspect Routine Heartbeats

cron-guard status

Output:

💓 Cron Heartbeats Status (3 jobs tracked):

  • [🟢 SUCCESS] daily-traffic
    Last run: 2026-11-14T06:20:00Z (1,240ms)
  • [⏸️ SKIPPED] backup-wiki
    Last run: 2026-11-14T06:25:00Z (4ms)
    Skipped reasons: Active agent task lock(s) in progress: refactor-auth

💻 Programmatic TypeScript API

import { CronGuard } from '@oiyonet/cron-guard';

const guard = new CronGuard();

const record = guard.runGuarded('nightly-build', 'npm run build', {
  requireCleanGit: true,
  requireNoInflightLock: true,
  minIntervalMinutes: 720, // 12 hours
});

console.log(record.status); // 'SUCCESS' | 'SKIPPED' | 'FAILED'

🌐 Powered by OIYO Lab

@oiyonet/cron-guard is an open-source tool developed and maintained by OIYO Lab. Explore our companion developer tools at tools.oiyo.net and deep technical engineering articles on blog.oiyo.net.

License

MIT © OIYO Lab