hive-scheduler

How to create scheduled jobs in Hive framework

16 stars

Best use case

hive-scheduler is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

How to create scheduled jobs in Hive framework

Teams using hive-scheduler should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/hive-scheduler/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/hive-scheduler/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/hive-scheduler/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How hive-scheduler Compares

Feature / Agenthive-schedulerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

How to create scheduled jobs in Hive framework

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Scheduler Jobs

Background jobs on cron schedules.

Location: `/src/scheduler/handlers/{jobName}.js`

## Template

```javascript
import db from 'db';

export const handler = async () => {
  // Job logic
};

export const cron = '0 * * * *';  // Every hour
```

## Cron Patterns

```
┌─ minute (0-59)
│ ┌─ hour (0-23)
│ │ ┌─ day of month (1-31)
│ │ │ ┌─ month (1-12)
│ │ │ │ ┌─ day of week (0-6)
* * * * *
```

| Pattern | Schedule |
|---------|----------|
| `* * * * *` | Every minute |
| `*/5 * * * *` | Every 5 minutes |
| `0 * * * *` | Every hour |
| `0 */12 * * *` | Every 12 hours |
| `0 0 * * *` | Daily at midnight |
| `0 9 * * 1` | Mondays at 9am |

## Examples

**Sync external data:**
```javascript
import db from 'db';
import moment from 'moment';
import externalApi from 'services/externalApi';

export const handler = async () => {
  const items = await externalApi.list({
    updatedSince: moment().subtract(5, 'minutes').toDate(),
  });
  
  for (const item of items) {
    await db.services.items.updateOne(
      { externalId: item.id },
      (doc) => ({ ...doc, ...item })
    );
  }
};

export const cron = '*/5 * * * *';
```

**Mark overdue:**
```javascript
import db from 'db';
import moment from 'moment';

export const handler = async () => {
  await db.services.invoices.updateMany(
    {
      isPaid: { $ne: true },
      isDue: { $ne: true },
      dueOn: { $lt: new Date() },
    },
    (doc) => ({ ...doc, isDue: true })
  );
};

export const cron = '0 */12 * * *';
```

## Rules

- Export both `handler` and `cron`
- Keep jobs idempotent (safe to re-run)
- Log progress for debugging

Related Skills

hive-overview

16
from diegosouzapw/awesome-omni-skill

Hive framework structure and conventions. Apply when working with this codebase.

hive-mapping

16
from diegosouzapw/awesome-omni-skill

Schema mappings for auto-syncing embedded documents

hive-handler

16
from diegosouzapw/awesome-omni-skill

How to create event handlers in Hive framework

hive-endpoint

16
from diegosouzapw/awesome-omni-skill

How to create API endpoints in Hive framework

hive-credentials

16
from diegosouzapw/awesome-omni-skill

Set up and install credentials for an agent. Detects missing credentials from agent config, collects them from the user, and stores them securely in the local encrypted store at ~/.hive/credentials.

file-archiver

16
from diegosouzapw/awesome-omni-skill

创建和解压ZIP、TAR和GZIP压缩包,支持密码保护。

chatgpt-archive-topic-background-report

16
from diegosouzapw/awesome-omni-skill

Build a topic-focused research collection from ChatGPT archive viewer conversations (latest archive or all archives), run a background Responses API consolidation job with web search, and save markdown plus raw response artifacts. Use when the user asks to find archive threads by topic, reconcile repetition/contradictions, and generate a saved report with minimal polling noise.

hive-mind-advanced

16
from diegosouzapw/awesome-omni-skill

Advanced Hive Mind collective intelligence system for queen-led multi-agent coordination with consensus mechanisms and persistent memory

social-media-scheduler

16
from diegosouzapw/awesome-omni-skill

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

github-archive

16
from diegosouzapw/awesome-omni-skill

Investigate GitHub security incidents using tamper-proof GitHub Archive data via BigQuery. Use when verifying repository activity claims, recovering deleted PRs/branches/tags/repos, attributing actions to actors, or reconstructing attack timelines. Provides immutable forensic evidence of all public GitHub events since 2011.

archive

16
from diegosouzapw/awesome-omni-skill

Archive completed task/spec work to ./.gtd/archive/

archive-work

16
from diegosouzapw/awesome-omni-skill

Archive completed scratchpads and session logs to project history. Invoke when user says "archive this work", "clean up scratchpad", "archive scratchpad", or after PR is merged.