Scheduler Cron JSON

Description

XSpoonAi 2e43a3a 3 files · 11.4 KB Updated

File contents

Description

Emit cronjob JSON configurations for hosted schedulers. Generates cron configurations for task automation platforms.

Inputs

{
  "schedule": "0 0 * * *|cron expression",
  "task": "Task name",
  "webhook": "Webhook URL"
}

Outputs

{
  "ok": true,
  "data": {
    "config": "Cron configuration",
    "next_run": "ISO timestamp"
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Generate Cron Config

echo '{"schedule":"0 0 * * *","task":"daily_backup"}' | python3 scripts/main.py

Examples

Example 1: Create Daily Schedule

$ echo '{"schedule":"0 0 * * *","task":"daily_backup","webhook":"https://corns-testingbysambit.vercel.app/test"}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "config": "0 0 * * * curl https://corns-testingbysambit.vercel.app/test",
    "next_run": "2026-02-07T00:00:00Z"
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "schedule": "Invalid cron expression"
  }
}

XSpoonAi/spoon-awesome-skill/tree/main/ai-productivity/scheduler-cron-json commit 2e43a3ac4c

Frequently asked questions

npx skillmds@latest add xspoonai/scheduler-cron-json