{"_id":"opencode-scheduler","_rev":"8-db841748566e63ff74895b0fdd4d2fe6","name":"opencode-scheduler","dist-tags":{"latest":"1.3.0"},"versions":{"0.1.0":{"name":"opencode-scheduler","version":"0.1.0","keywords":["opencode","scheduler","cron","launchd","systemd","plugin","automation"],"license":"MIT","_id":"opencode-scheduler@0.1.0","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"dist":{"shasum":"6f0b7f69ea428e511eb8a40b7fd92d13d91324c6","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-0.1.0.tgz","fileCount":4,"integrity":"sha512-MWbZHG8Yi98bbBWeXkJwhcPRAzXPFIOp4xiKIUOYNcHqS7Fc7Z0iWKWKAt1YFNdNWt5PeLc4wFf7/g30LukqMA==","signatures":[{"sig":"MEQCIHqCKkq0zPc0b/zOSWoA4ug74eOkMqQWovQonJ525cdmAiAuyadO0xCPCYZ7nzioYQCmpb8j28pMe+2dNdelq4SXOg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":424798},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"dad2d6e06e6fcc7187dfa403523b26a0e3e3890e","scripts":{"build":"bun build index.ts --outdir dist --target node","prepublishOnly":"bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs (launchd/systemd)","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.1","typescript":"^5.9.3","@opencode-ai/plugin":"^1.1.3"},"peerDependencies":{"typescript":">=5.0.0","@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_0.1.0_1767683924662_0.8490395887371616","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"opencode-scheduler","version":"1.0.0","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.0.0","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"3eb470eaa44f3a98e388c7b4cff484cb393d605e","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.0.0.tgz","fileCount":5,"integrity":"sha512-MAuirYU4XXLipkODRcTdbicRQD4FXyYpOgBIwnhyw2ssH2Csj4ti7FYxCRKsu2qyTNgu+i42hRxPZhDiM5fTWQ==","signatures":[{"sig":"MEUCIQC+PXBw8ishSC6nX9F1ELeRJaH+zridruOFEgFqK5aEkAIgWuZ7ltFzQUPlIITlexpOzxqPhNNNWLLSuNoxdkSBePg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":483929},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"fdd2c282493fe628f5a19970b56967d14a457903","scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.0.0_1768155646317_0.3561697599461704","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"opencode-scheduler","version":"1.0.1","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.0.1","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"26c11ae4b6ac61d72ebedf80ff5152421d8b115e","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.0.1.tgz","fileCount":5,"integrity":"sha512-BcXjfrS7WxiGdVb6GNBDyd4wE0oA/+B2sWD1H9V5lLYLOYybiOf5JrVVJi4x7hNBtQSFkN0sCrCyD0FXHq71GQ==","signatures":[{"sig":"MEYCIQDj5Opl/QwQnR5PSrIoqlStRwvcBbgig4X1dWMvH9ydnAIhAKjrb5uCFHhAslHPMZNI1tuB8FlpzCG/oDEDDOlfl6pz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":484140},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"51f35137a845390a84a7f6790a8edc88e7194174","scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","release:major":"npm version major && npm publish","release:minor":"npm version minor && npm publish","release:patch":"npm version patch && npm publish","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.0.1_1768156898257_0.36102742985864444","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"opencode-scheduler","version":"1.0.2","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.0.2","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"2e86c8256c08c431d7f211ca2bb70b17173c0882","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.0.2.tgz","fileCount":5,"integrity":"sha512-Sd68t5eNDBYi8UTWww91tUO3sI2OZCEcospBGI1AeIYuHKkytQKn/1AVntqSh284wdyfhMpsRXwkfnaT7PwtIg==","signatures":[{"sig":"MEYCIQDn3P/y7j0LchReRGEldN2oQ8sDdP91mfdNtFRlBpTi5AIhAIB4VR3GurSHmWIJQb6J8/C35ruF/ta+9eYP8TzwTy5n","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":489388},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d7c050730c13f2613b327b69778f1ea41f1a82cb","scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","release:major":"npm version major && npm publish","release:minor":"npm version minor && npm publish","release:patch":"npm version patch && npm publish","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.0.2_1768377027150_0.58938567350697","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"opencode-scheduler","version":"1.0.3","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.0.3","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"93168c94c2c3bec32a28ec66707feedb980984f5","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.0.3.tgz","fileCount":5,"integrity":"sha512-Dhr6eWKVmGaChX5q8wE4LSgW5xbH+jSUSDZfGo6WNi0tm12Gqg01QIjFoDDELK5tjFSVI+BktqJii656Mf4djg==","signatures":[{"sig":"MEQCIC5/MBrAH8f31AC8w5X3eOR4+OxmN3XYfgKM0ImonvDIAiA9UeeAq5Rp45/uZD86BjVOl044NV5TZWsUMnNYD2P0Mg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":493529},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d6947dcb0ef52d507f46d0e39631d3a2559f54b2","scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","release:major":"npm version major && npm publish","release:minor":"npm version minor && npm publish","release:patch":"npm version patch && npm publish","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.0.3_1768379303442_0.4384626701472889","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"opencode-scheduler","version":"1.1.0","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.1.0","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"eab357c38dea821a0a4a4b553d2227928817b925","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.1.0.tgz","fileCount":5,"integrity":"sha512-oMJxRf9kbZR4nUeKYSNpmOsTGh6wEpXWUhAqmzXdYqnTIpqw5Y1V6XgHJAvcBuN0qrxKUF16V1PlUPIFkRjjeg==","signatures":[{"sig":"MEQCIGT/KW/qmpZ1W7U/jcxB8jnh5Vtt2tR7ak4jeKEdHAYbAiBdLqchgrVvvzwh/BzzdPPerDvI5VsTtDwoUIGxS6voNw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":513524},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","release:major":"npm version major && npm publish","release:minor":"npm version minor && npm publish","release:patch":"npm version patch && npm publish","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.1.0_1768612341812_0.01724638655501387","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"opencode-scheduler","version":"1.2.0","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","_id":"opencode-scheduler@1.2.0","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"homepage":"https://github.com/different-ai/opencode-scheduler#readme","bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"dist":{"shasum":"fd221f0457af0353e15b0f4f12a0495892a822a1","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.2.0.tgz","fileCount":5,"integrity":"sha512-nXJMhT632AGdQQSzJ+o+ZiulXPSbKvZRAn5Fh/DmSEZJjr/nFrkZKdBjkBqKQB6lckzGFQogufeQjN3ikbZlUQ==","signatures":[{"sig":"MEQCICsuIoKKdkm3dm1AYmfb+IVBJHyc8BGeUAOlZJBJxfhMAiBz3oKrZDyain1s5uYrwmpS2HQlClfvVwR4hOn2w7np3g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":531209},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","typecheck":"tsc --noEmit","release:major":"npm version major && npm publish","release:minor":"npm version minor && npm publish","release:patch":"npm version patch && npm publish","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"repository":{"url":"git+https://github.com/different-ai/opencode-scheduler.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-scheduler_1.2.0_1770674143586_0.46455961336979734","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"opencode-scheduler","version":"1.3.0","description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","main":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly","clean":"rm -rf dist","prepublishOnly":"bun run clean && bun run build","release:patch":"npm version patch && npm publish","release:minor":"npm version minor && npm publish","release:major":"npm version major && npm publish","typecheck":"tsc --noEmit"},"keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"author":{"name":"Benjamin Shafii"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/different-ai/opencode-scheduler.git"},"bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"homepage":"https://github.com/different-ai/opencode-scheduler#readme","dependencies":{"@opencode-ai/plugin":"^1.0.162"},"devDependencies":{"bun-types":"latest","typescript":"^5.7.3"},"peerDependencies":{"@opencode-ai/plugin":">=1.0.0"},"_id":"opencode-scheduler@1.3.0","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-zloAazOZDiPop1V6B5jMKcG1M+ogl0VI5Ym3xu7vj3siAncU26Wn+hMbn9FfvpHqEBGWbzLrhJVZPb9yIRvESw==","shasum":"5851668153d55d34a62760356a60749703ffa472","tarball":"https://registry.npmjs.org/opencode-scheduler/-/opencode-scheduler-1.3.0.tgz","fileCount":5,"unpackedSize":548205,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDyEYQ4LTe6rZFQI3OsJ5s9sqzROQwxkcrS4V0x/DiwXAiEA7nT9bVj5Eq/LQRklISO7RZquXKCav432nhhK0vE+2OY="}]},"_npmUser":{"name":"different-ai-xyz","email":"ben@embedbase.xyz"},"directories":{},"maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-scheduler_1.3.0_1771300868852_0.258731880636236"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-06T07:18:44.661Z","modified":"2026-02-17T04:01:09.149Z","0.1.0":"2026-01-06T07:18:44.802Z","1.0.0":"2026-01-11T18:20:46.493Z","1.0.1":"2026-01-11T18:41:38.414Z","1.0.2":"2026-01-14T07:50:27.296Z","1.0.3":"2026-01-14T08:28:23.580Z","1.1.0":"2026-01-17T01:12:22.122Z","1.2.0":"2026-02-09T21:55:43.734Z","1.3.0":"2026-02-17T04:01:09.038Z"},"bugs":{"url":"https://github.com/different-ai/opencode-scheduler/issues"},"author":{"name":"Benjamin Shafii"},"license":"MIT","homepage":"https://github.com/different-ai/opencode-scheduler#readme","keywords":["opencode","plugin","scheduler","cron","launchd","systemd","automation","jobs"],"repository":{"type":"git","url":"git+https://github.com/different-ai/opencode-scheduler.git"},"description":"OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)","maintainers":[{"name":"different-ai-xyz","email":"ben@embedbase.xyz"}],"readme":"# opencode-scheduler\n\nRun AI agents on a schedule. Set up recurring tasks that execute autonomously—even when you're away.\n\n```\nSchedule a daily job at 9am to search Facebook Marketplace for posters under $100 and send the top 5 deals to my Telegram\n```\n\nThis is an [OpenCode](https://opencode.ai) plugin that uses your OS's native scheduler (launchd on macOS, systemd on Linux, Task Scheduler on Windows) to run prompts reliably.\n\nAs of `v1.2.0`, jobs are scoped by `workdir` (so different projects don't collide), and scheduled runs are supervised (no overlap + optional timeout).\n\n## Install\n\nAdd to your `opencode.json`:\n\n```json\n{\n  \"plugin\": [\"opencode-scheduler\"]\n}\n```\n\n## Examples\n\n**Daily deal hunting:**\n```\nSchedule a daily job at 9am to search for standing desks under $300\n```\n\n**Weekly reports:**\n```\nSchedule a job every Monday at 8am to summarize my GitHub notifications\n```\n\n**Recurring reminders:**\n```\nSchedule a job every 6 hours to check if my website is up and alert me on Slack if it's down\n```\n\n## Commands\n\n| Command | Example |\n|---------|---------|\n| Schedule a job | `Schedule a daily job at 9am to...` |\n| List jobs | `Show my scheduled jobs` |\n| Get version | `Show scheduler version` |\n| Install skill template | `Install the scheduled job best practices skill` |\n| Get job | `Show details for standing-desk` |\n| Update job | `Update standing-desk to run at 10am` |\n| Run immediately | `Run the standing-desk job now` |\n| View logs | `Show logs for standing-desk` |\n| Delete | `Delete the standing-desk job` |\n| Global cleanup (dry run) | `Run scheduler global cleanup` |\n\n## How It Works\n\n1. You describe what you want scheduled in natural language\n2. The plugin writes a job file (scoped by `workdir`) and installs a timer in your OS scheduler\n3. At the scheduled time, the OS scheduler calls a small supervisor script\n4. The supervisor runs the job, appends logs, and updates job metadata\n\nYou can also trigger a job immediately via `run_job`—it runs fire-and-forget and appends to the same log file.\n\nJobs run from the working directory where you created them, picking up your `opencode.json` and MCP configurations.\n\n### Reliability Guarantees (Scheduled Runs)\n\n- **No overlap**: if the previous run is still active, the next scheduled tick is skipped.\n- **Non-interactive by default**: scheduled runs force `OPENCODE_PERMISSION` to deny \"question\" prompts, so jobs don't hang waiting for approvals.\n- **Optional timeout**: set `timeoutSeconds` to hard-stop long runs (SIGTERM, then SIGKILL).\n\n### Platform Support\n\n| Platform | Scheduler backend | Notes |\n|------|------|------|\n| macOS | `launchd` | Full support (supervised scheduled runs) |\n| Linux | `systemd --user` | Full support (supervised scheduled runs) |\n| Windows | `schtasks` (Task Scheduler) | Supported with cron subset mapping (see limits below) |\n\nWindows Task Scheduler limits:\n\n- Cron expressions that use unsupported combinations (for example, month + weekday constraints, or month-only without explicit day-of-month) return a clear error with guidance.\n- Complex cron schedules may be expanded into multiple Windows tasks under `\\\\OpenCode\\\\opencode-job-...`.\n- Windows scheduled runs currently do **not** use the supervisor pipeline used on macOS/Linux, so no-overlap and timeout enforcement are not guaranteed by the OS integration itself.\n\n---\n\n## Reference\n\n### Cron Syntax\n\nJobs use standard 5-field cron expressions:\n\n```\n┌───────────── minute (0-59)\n│ ┌───────────── hour (0-23)\n│ │ ┌───────────── day of month (1-31)\n│ │ │ ┌───────────── month (1-12)\n│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)\n│ │ │ │ │\n* * * * *\n```\n\n| Expression | Meaning |\n|------------|---------|\n| `0 9 * * *` | Daily at 9:00 AM |\n| `0 */6 * * *` | Every 6 hours |\n| `30 8 * * 1` | Mondays at 8:30 AM |\n| `0 9,17 * * *` | At 9 AM and 5 PM daily |\n\n### Tools\n\n| Tool | Description |\n|------|-------------|\n| `schedule_job` | Create a new scheduled job |\n| `list_jobs` | List all scheduled jobs |\n| `get_version` | Show scheduler and opencode versions |\n| `get_skill` | Get built-in skill templates (best practices) |\n| `install_skill` | Install a built-in skill into your repo |\n| `get_job` | Fetch job details and metadata |\n| `update_job` | Update an existing job |\n| `delete_job` | Remove a scheduled job |\n| `cleanup_global` | Remove scheduler artifacts across all scopes (dry-run by default) |\n| `run_job` | Execute a job immediately (fire-and-forget) |\n| `job_logs` | View the latest logs from a job |\n\n`schedule_job` and `update_job` accept an optional `timeoutSeconds` (integer seconds). Use `0` (or omit) to disable.\n\nTools accept an optional `format: \"json\"` argument to return structured output with `success`, `output`, `shouldContinue`, and `data`.\n\n### Global Cleanup\n\nUse `cleanup_global` to clean scheduler artifacts across all scopes. It always starts in dry-run mode unless you pass `confirm: true`.\n\n- Dry run (safe default):\n\n```json\n{ \"confirm\": false }\n```\n\n- Execute global cleanup of job definitions + lock files + scheduler units:\n\n```json\n{ \"confirm\": true }\n```\n\n- Also delete logs and run history:\n\n```json\n{ \"confirm\": true, \"includeHistory\": true }\n```\n\nThe tool reports exactly how many artifacts were removed, grouped by location (jobs, locks, logs, runs, launchd/systemd units).\n\n### Storage\n\n| What | Where |\n|------|-------|\n| Job configs (scoped) | `~/.config/opencode/scheduler/scopes/<scopeId>/jobs/*.json` |\n| Run records (scoped) | `~/.config/opencode/scheduler/scopes/<scopeId>/runs/*.jsonl` |\n| Locks (scoped) | `~/.config/opencode/scheduler/scopes/<scopeId>/locks/*.json` |\n| Logs (scoped) | `~/.config/opencode/logs/scheduler/<scopeId>/*.log` |\n| Supervisor script | `~/.config/opencode/scheduler/supervisor.pl` |\n| launchd plists (Mac) | `~/Library/LaunchAgents/com.opencode.job.<scopeId>.*.plist` |\n| systemd units (Linux) | `~/.config/systemd/user/opencode-job-<scopeId>-*.{service,timer}` |\n| Task Scheduler entries (Windows) | `\\\\OpenCode\\\\opencode-job-<scopeId>-*` |\n\nLegacy note: older versions stored jobs in `~/.config/opencode/jobs/*.json` and used unscoped unit names. `delete_job` removes both scoped and legacy artifacts.\n\n### Working Directory\n\nJobs run from a specific directory to pick up MCP configs:\n\n```\nSchedule a daily job at 9am from /path/to/project to run my-task\n```\n\nBy default, jobs use the directory where you created them.\n\n### Scopes\n\nScopes are derived from the job's `workdir` (normalized absolute path). This isolates job storage, logs, and OS scheduler unit names per project.\n\n- `list_jobs` defaults to the **current scope** (your current working directory).\n- Use `allScopes: true` to list jobs across all scopes.\n- Use `includeLegacy: true` to include pre-`v1.2.0` jobs stored in `~/.config/opencode/jobs`.\n\n### Attach URL (optional)\n\nIf you have an OpenCode backend running via `opencode serve` or `opencode web`, you can set `attachUrl` on a job so runs use that backend:\n\n```\nUpdate the standing-desk job to use attachUrl http://localhost:4096\n```\n\n## Project Philosophy\n\n- This plugin is intentionally a thin wrapper: it schedules `opencode run` via launchd (Mac) or systemd (Linux).\n- Logs are the source of truth for scheduled runs: `~/.config/opencode/logs/*.log`.\n- Resiliency/reporting roadmap (not implemented): `PRD-resilient-execution.md`.\n\n### Built-in Skill Templates\n\nTo install the built-in skill into your project (no copy/paste), open OpenCode in your repo and run:\n\n```\nInstall the scheduled job best practices skill\n```\n\nThis calls the plugin’s `install_skill` tool and writes `.opencode/skill/scheduled-job-best-practices/SKILL.md`.\n\n(If you prefer, you can also say: `Get skill from opencode-scheduler and add it to my skills`.)\n\nThen add `@scheduled-job-best-practices` at the top of scheduled job prompts.\n\n(Manual option: use `get_skill` to fetch `scheduled-job-best-practices` and copy it into `.opencode/skill/scheduled-job-best-practices/SKILL.md`.)\n\n## Troubleshooting\n\n**Jobs not running?**\n\n1. Check if installed:\n   - Mac: `launchctl list | grep opencode`\n   - Linux: `systemctl --user list-timers | grep opencode`\n   - Windows: `schtasks /Query /TN \"\\\\OpenCode\\\\opencode-job-*\"`\n\n2. Check logs: `Show logs for my-job`\n\n3. Verify the working directory has the right `opencode.json` with MCP configs\n\n**MCP tools not available?**\n\nMake sure the job's working directory contains an `opencode.json` with your MCP server configurations.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}