hai-scheduler

Orchestrate API, JS, and hook tasks with DB-backed persistence and auditing.

3|7|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/hai-series/hai-framework --skill hai-scheduler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hai-scheduler
Source: https://github.com/hai-series/hai-framework/tree/main/packages/cli/templates/skills/hai-scheduler
Command: npx skills add https://github.com/hai-series/hai-framework --skill hai-scheduler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage cron-based tasks, API calls, and JS tasks with a single, auditable model that persists state and logs across the full lifecycle.

Core Features & Use Cases

  • Unified execution paths for API, JS, and hook tasks with persistent storage and manual triggering.
  • Global lifecycle hooks and audit-ready logs for operational visibility.
  • Optional distributed locking to coordinate tasks across nodes in a cluster. Example: Schedule regular health checks, trigger ad-hoc maintenance tasks, and review execution history in one place.

Quick Start

Initialize the scheduler with DB persistence, register a cron task, and inspect logs.

Frequently Asked Questions about hai-scheduler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule and persist cron-based tasks across a distributed system?

You can schedule and persist cron-based tasks across a distributed system using a unified scheduler with DB-backed persistence, global lifecycle hooks, and optional distributed locking to coordinate nodes. This ensures state and logs survive restarts.

What is the best way to manage API, JS, and hook tasks with audit logging?

The best way to manage API, JS, and hook tasks with audit logging is a unified execution model that persists execution state and provides audit-ready logs across the full task lifecycle for operational visibility.

Can I manually trigger a scheduled task and retrieve its execution logs?

Yes, you can manually trigger scheduled tasks and retrieve execution logs. The scheduler supports manual triggers alongside cron scheduling and provides log querying capabilities to review execution history on demand.

Does distributed locking work for coordinating tasks in a cluster?

Yes, distributed locking works for coordinating tasks in a cluster. The scheduler provides optional distributed locks to orchestrate API, JS, and hook tasks across multiple nodes, preventing overlapping executions in distributed systems.

When do I need DB-backed persistence for task scheduling?

You need DB-backed persistence for task scheduling when orchestrating API, JS, and hook tasks that require state retention, audit-ready logs, and reliable recovery across restarts in both local apps and distributed systems.