{"id":49281862,"url":"https://github.com/legionio/kai-plugin-cron","last_synced_at":"2026-04-25T19:01:45.377Z","repository":{"id":353803969,"uuid":"1211897454","full_name":"LegionIO/kai-plugin-cron","owner":"LegionIO","description":"Kai Desktop plugin for scheduling recurring cron jobs — shell commands, HTTP requests, and AI agent tasks with full audit history","archived":false,"fork":false,"pushed_at":"2026-04-25T17:29:47.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T17:34:13.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LegionIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T21:29:16.000Z","updated_at":"2026-04-25T17:29:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/LegionIO/kai-plugin-cron","commit_stats":null,"previous_names":["legionio/kai-plugin-cron"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/LegionIO/kai-plugin-cron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-plugin-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-plugin-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-plugin-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-plugin-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LegionIO","download_url":"https://codeload.github.com/LegionIO/kai-plugin-cron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-plugin-cron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32273223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-25T19:01:42.540Z","updated_at":"2026-04-25T19:01:45.369Z","avatar_url":"https://github.com/LegionIO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cron Scheduler Plugin for Kai Desktop\n\nSchedule recurring tasks with cron expressions in [Kai Desktop](https://github.com/kai-systems/kai-desktop) — run shell commands, HTTP requests, or AI agent jobs on a timer with full audit history.\n\n## Features\n\n- **Dock Icon \u0026 Management Panel** — Clock icon in the sidebar opens a full-page panel for managing all cron jobs\n- **Two Job Types:**\n  - **Command** — Execute shell commands or HTTP requests on a schedule\n  - **AI Agent** — Kick off an AI task with a prompt, system prompt, and full tool access (e.g. \"collect the news and send me a summary email\")\n- **Full Audit Trail** — Every run is recorded with timestamps, duration, and complete output:\n  - Shell jobs: stdout, stderr, exit code\n  - HTTP jobs: status code, response body, request headers\n  - AI jobs: full message transcript, every tool call with args/results/timing, model used\n- **AI Tools for CRUD** — The main Kai AI agent can create, list, update, delete, run, stop, and query history for cron jobs via tool calls\n- **Missed Run Detection** — If the app was closed when a job was due, it's marked as `skipped` with a notification on next launch\n- **Job Kill Support** — Stop any running job (shell, HTTP, or AI) mid-execution from the UI or via AI tool\n- **Per-Job Model/Profile Overrides** — Configure model, profile, auto/manual routing, and thinking level at the plugin default level or per individual cron job\n- **Cron Expression Display** — Human-readable descriptions of cron schedules (e.g. `0 9 * * 1-5` shows \"At 9:00 AM, on weekdays\")\n- **Timezone Support** — Per-job timezone selection from a comprehensive list of IANA timezones\n- **Notifications** — Native macOS and in-app notifications on job completion or failure\n- **History Rotation** — Automatic pruning of old run records per configurable retention limit\n- **Concurrent Execution Guard** — Prevents the same job from running twice simultaneously\n\n## Prerequisites\n\n- [Kai Desktop](https://github.com/kai-systems/kai-desktop) installed and running\n\n## Installation\n\n1. **Clone this repo** into your plugins directory:\n\n   ```bash\n   cd ~/.kai/plugins\n   git clone https://github.com/kai-systems/kai-plugin-cron.git cron\n   ```\n\n   Or clone elsewhere and symlink:\n\n   ```bash\n   git clone https://github.com/kai-systems/kai-plugin-cron.git ~/git/kai-plugin-cron\n   ln -sf ~/git/kai-plugin-cron ~/.kai/plugins/cron\n   ```\n\n2. **Install dependencies and build:**\n\n   ```bash\n   cd ~/.kai/plugins/cron\n   npm install\n   npm run build\n   ```\n\n3. **Restart Kai Desktop** — The plugin will be discovered automatically. Approve it when prompted.\n\n4. **Create your first job** — Click the clock icon in the dock, then click \"+ New Job\".\n\n## Configuration\n\n### Plugin Settings\n\nAccess via Settings \u003e Cron Scheduler:\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| Default Model | Model for AI cron jobs | Kai default |\n| Default Profile | Profile for AI cron jobs | None |\n| Auto/Manual Routing | Fallback model routing mode | Manual |\n| Thinking Level | Reasoning effort (low/medium/high/xhigh) | Default |\n| Max Records Per Job | Run history retention limit | 100 |\n| Command Timeout | Default timeout for shell/HTTP jobs | 60000 ms |\n\n### Per-Job AI Overrides\n\nWhen creating or editing an AI cron job, you can override the plugin defaults for model, profile, auto/manual routing, and thinking level. Per-job settings take priority over plugin defaults.\n\n### Model/Profile Selector Behavior\n\n- Selecting a non-default profile automatically enables Auto mode and sets the model to that profile's primary model\n- Selecting the default profile disables Auto mode\n- Auto mode can still be toggled manually\n- When Auto mode is ON, the model dropdown is locked to the profile's primary model\n- When Auto mode is OFF, the model dropdown is freely selectable\n\n## AI Tools\n\nThe plugin registers these tools that Kai's AI agent can call directly in conversation:\n\n| Tool | Description |\n|------|-------------|\n| `create-cron` | Create a new cron job (command or AI type) |\n| `list-crons` | List all configured cron jobs with status |\n| `get-cron` | Get full details of a specific job |\n| `update-cron` | Update an existing job's configuration |\n| `delete-cron` | Delete a job and its history |\n| `get-cron-history` | Query run history with optional filters |\n| `run-cron-now` | Immediately execute a job |\n| `stop-cron` | Kill a currently running job |\n\n**Example:** Ask Kai _\"Create a cron job that runs every weekday at 9am and summarizes the top tech news\"_ and it will use the `create-cron` tool to set it up.\n\n## Development\n\n```bash\n# Watch for changes and rebuild\nnpm run watch\n\n# After changes, restart Kai Desktop to reload the plugin\n# The renderer cache may need clearing:\nrm -rf ~/.kai/plugin-renderers/cron\n```\n\n### Project Structure\n\n```\nplugin.json              # Plugin manifest\nmain.ts                  # Main process entry point (activate/deactivate)\nrenderer.js              # Renderer entry (bundled by Kai's esbuild)\nsrc/\n  shared/\n    types.ts             # All TypeScript types\n    constants.ts         # IDs, icons, defaults\n  main/\n    executor.ts          # Job execution (shell, HTTP, AI) with abort support\n    scheduler.ts         # Timer-based cron engine with missed-run detection\n    storage.ts           # Job persistence (config) + history (JSON file)\n    tools.ts             # AI tool definitions (CRUD + run + stop + history)\n  renderer/\n    hooks.ts             # React hooks (from host)\n    components/\n      CronPanel.tsx      # Main panel (list/detail/create/edit views)\n      CronSettings.tsx   # Plugin settings page\n      JobList.tsx        # Job list with status, next run, actions\n      JobForm.tsx        # Create/edit form with model/profile selectors\n      JobDetail.tsx      # Job detail view with run history\n      RunHistory.tsx     # Expandable run history with full audit details\n      ModelProfileSelectors.tsx  # Model/profile/auto-manual/thinking dropdowns\n      cronDisplay.ts     # Cron expression to human-readable text\n```\n\n## Kai Desktop Framework Changes\n\nThis plugin uses the `abortSignal` option on `api.agent.generate()` for killing in-progress AI cron jobs. This requires Kai Desktop with the abort signal threading through `PluginAgentGenerateOptions` → `generateForPlugin` → `streamAgentResponse`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Fkai-plugin-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegionio%2Fkai-plugin-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Fkai-plugin-cron/lists"}