{"_id":"@bedev.io/nextjs-crons","_rev":"6-604ec914387dedd8e784993d2ef28975","name":"@bedev.io/nextjs-crons","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@bedev.io/nextjs-crons","version":"1.0.0","keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"url":"www.bedev.io","name":"Quentin Mousset"},"license":"MIT","_id":"@bedev.io/nextjs-crons@1.0.0","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"bin":{"nextjs-crons":"dist/cli.js"},"dist":{"shasum":"82684a8e1385c4a042c29b9f20c044e9ac38104f","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.0.tgz","fileCount":11,"integrity":"sha512-yLuiIY8Z9exIU+HFymXOS2KDir571EWcPtfBfQ38pUA7zm1dgN7FvT419NmD1NRB0Io/S+WPNzJAznx0uyAFFQ==","signatures":[{"sig":"MEUCID02YcnNph8gK5dt+OzSZjrzBthfMcODxfvAvqlvQwEkAiEAn8U49YoJqGJk7aQoPI1vf32cRiN0cGP05e1tjdfZ3so=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29189},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9d193b5ef92543f1ba14cbe9ba17fa459c0cb0d2","scripts":{"cli":"node dist/cli.js","link":"npm link","test":"jest","build":"tsc","unlink":"npm unlink -g","cli:dev":"ts-node src/cli.ts","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"_npmVersion":"11.2.0","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-cron":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-crons_1.0.0_1767618559815_0.12782358428998442","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bedev.io/nextjs-crons","version":"1.0.1","keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"url":"www.bedev.io","name":"Quentin Mousset"},"license":"MIT","_id":"@bedev.io/nextjs-crons@1.0.1","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"bin":{"nextjs-crons":"dist/cli.js"},"dist":{"shasum":"046695975354e769f5f4f33d1a008ce5510fec42","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.1.tgz","fileCount":11,"integrity":"sha512-5FBNRisquQUHAsFwnLQ2MrVZS/ZVQHQBBc2CCIWBt4NN/T4/ULDBU02Xd1UfqM/izdqxXyxZqWPztA9QOZ1OmQ==","signatures":[{"sig":"MEYCIQDhezn5aYQan7E3arFXjaTtxpjn2tXtof5gXtwSmdiRdwIhAIhSPRun4dsX077qbv6GcGQLOQkUcrm2zVGGJv5++e8j","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29189},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9d193b5ef92543f1ba14cbe9ba17fa459c0cb0d2","scripts":{"cli":"node dist/cli.js","link":"npm link","test":"jest","build":"tsc","unlink":"npm unlink -g","cli:dev":"ts-node src/cli.ts","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"_npmVersion":"11.2.0","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-cron":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-crons_1.0.1_1767618735778_0.09070700793951358","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bedev.io/nextjs-crons","version":"1.0.2","keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"url":"www.bedev.io","name":"Quentin Mousset"},"license":"MIT","_id":"@bedev.io/nextjs-crons@1.0.2","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"bin":{"nextjs-crons":"dist/cli.js"},"dist":{"shasum":"2c6c0f00c3bdee2d63efe40d1c4706033a1ae99a","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.2.tgz","fileCount":11,"integrity":"sha512-OL2KP/afM0IxJpj7X/PFGs0ZIqb38wKc6X3T6kKZkxwTaYwiXzRl9qVBo9b0U024fNmUUTJzv5+n9QZ/Bu0MuA==","signatures":[{"sig":"MEQCIFpJNCs434Rqjuw2c20X4uHtDjCQegn7X8p+yoEFlr97AiBrlXQ3fWnjKxW+xXGSeZqYrnFvIcuf0uJ2wCJ3SPOClw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29189},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9d193b5ef92543f1ba14cbe9ba17fa459c0cb0d2","scripts":{"cli":"node dist/cli.js","link":"npm link","test":"jest","build":"tsc","unlink":"npm unlink -g","cli:dev":"ts-node src/cli.ts","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"_npmVersion":"11.2.0","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-cron":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-crons_1.0.2_1767618917104_0.8912578144496659","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bedev.io/nextjs-crons","version":"1.0.3","keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"name":"Quentin Mousset","email":"info@bedev.io"},"license":"MIT","_id":"@bedev.io/nextjs-crons@1.0.3","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"homepage":"https://github.com/bedev-io/nextjs-crons#readme","bugs":{"url":"https://github.com/bedev-io/nextjs-crons"},"bin":{"nextjs-crons":"dist/cli.js"},"dist":{"shasum":"45455303472dcb32518587a62cf48aaffc372c62","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.3.tgz","fileCount":11,"integrity":"sha512-jiOKbq1fNHXy/xgzeR4Tex1PWupzD7kh74XDIcL9v9Fa17PVBv9I2mlS2jDixIBC7rjVEeWibfIGsYzZPqmH4w==","signatures":[{"sig":"MEQCICc+3yPv5AVvFb9HHhcifFe3hYEayeVhZu19stccZvhFAiAk1rRh5kXNWjVoF8geIGH0b2tzW6Z4QivjJyI5XjUAjw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29357},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9d193b5ef92543f1ba14cbe9ba17fa459c0cb0d2","scripts":{"cli":"node dist/cli.js","link":"npm link","test":"jest","build":"tsc","unlink":"npm unlink -g","cli:dev":"ts-node src/cli.ts","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"repository":{"url":"git+https://github.com/bedev-io/nextjs-crons.git","type":"git"},"_npmVersion":"11.2.0","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-cron":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-crons_1.0.3_1767619036705_0.8290948929336317","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bedev.io/nextjs-crons","version":"1.0.4","keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"name":"Quentin Mousset","email":"info@bedev.io"},"license":"MIT","_id":"@bedev.io/nextjs-crons@1.0.4","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"homepage":"https://github.com/bedev-io/nextjs-crons#readme","bugs":{"url":"https://github.com/bedev-io/nextjs-crons"},"bin":{"nextjs-crons":"dist/cli.js"},"dist":{"shasum":"663a2722091c6b9d08522da2fc372c6cbf215738","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.4.tgz","fileCount":11,"integrity":"sha512-6N3ykE8TiuVrRwrO2+ReBJBarPt4ZzjuG9X4Fbe1S+3mKLr3lr+1UOjaDunJwnDEBR8K0f2AhtSij5kVmMnavg==","signatures":[{"sig":"MEQCIDkcueVQibJMCnEQjKaAeHxkKo2Lm6EApPSy/H6Ee8fsAiAunF5Ptbw+X8UBVs5beUceEGGU5K3sQ3H6SnDfkZYhlA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29400},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"ddbe28085272887615534317a57448e16ac9ec2f","scripts":{"cli":"node dist/cli.js","link":"npm link","test":"jest","build":"tsc","unlink":"npm unlink -g","cli:dev":"ts-node src/cli.ts","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"repository":{"url":"git+https://github.com/bedev-io/nextjs-crons.git","type":"git"},"_npmVersion":"11.2.0","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-cron":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11"},"_npmOperationalInternal":{"tmp":"tmp/nextjs-crons_1.0.4_1767619800752_0.9757564904560803","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@bedev.io/nextjs-crons","version":"1.0.5","description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","main":"dist/index.js","types":"dist/index.d.ts","bin":{"nextjs-crons":"dist/cli.js"},"repository":{"type":"git","url":"git+https://github.com/bedev-io/nextjs-crons.git"},"bugs":{"url":"https://github.com/bedev-io/nextjs-crons"},"scripts":{"build":"tsc","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build","cli":"node dist/cli.js","cli:dev":"ts-node src/cli.ts","link":"npm link","unlink":"npm unlink -g"},"keywords":["nextjs","vercel","cron","scheduler","cli"],"author":{"name":"Quentin Mousset","email":"info@bedev.io"},"license":"MIT","dependencies":{"node-cron":"^3.0.3"},"devDependencies":{"@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/node-cron":"^3.0.11","jest":"^29.7.0","ts-jest":"^29.1.1","typescript":"^5.3.3"},"_id":"@bedev.io/nextjs-crons@1.0.5","gitHead":"ddbe28085272887615534317a57448e16ac9ec2f","homepage":"https://github.com/bedev-io/nextjs-crons#readme","_nodeVersion":"22.14.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-RXlar8CS3jQtpL39n++sCmqcJmv28oFmSfEvcDkp4iMFZS1V44SgPKKIX5si/w406zYsmADCY0UaVKdAZIcVgA==","shasum":"88b7e8f1010629d2d02a3cbb49b8d19c27b97503","tarball":"https://registry.npmjs.org/@bedev.io/nextjs-crons/-/nextjs-crons-1.0.5.tgz","fileCount":11,"unpackedSize":29539,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDO0lRMB02DwEVRewGeIWsaCY/IEawJUd/yZd6PBY3bMAIgbJUHCzdIKiFnfBk4HBtrYXPp3xgyntWOGqTo04fwBmo="}]},"_npmUser":{"name":"bedevio","email":"info@bedev.io"},"directories":{},"maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nextjs-crons_1.0.5_1767619963826_0.43830253631294736"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-05T13:09:19.719Z","modified":"2026-01-05T13:32:44.250Z","1.0.0":"2026-01-05T13:09:19.961Z","1.0.1":"2026-01-05T13:12:15.927Z","1.0.2":"2026-01-05T13:15:17.261Z","1.0.3":"2026-01-05T13:17:16.852Z","1.0.4":"2026-01-05T13:30:00.907Z","1.0.5":"2026-01-05T13:32:44.010Z"},"bugs":{"url":"https://github.com/bedev-io/nextjs-crons"},"author":{"name":"Quentin Mousset","email":"info@bedev.io"},"license":"MIT","homepage":"https://github.com/bedev-io/nextjs-crons#readme","keywords":["nextjs","vercel","cron","scheduler","cli"],"repository":{"type":"git","url":"git+https://github.com/bedev-io/nextjs-crons.git"},"description":"A lightweight CLI and library to run Next.js Vercel cron jobs locally","maintainers":[{"name":"bedevio","email":"info@bedev.io"},{"name":"taramis","email":"quentinmousset@gmail.com"}],"readme":"# nextjs-crons\n\nA lightweight CLI and library to run Next.js Vercel cron jobs locally or in any environment.\n\n## Features\n\n- ✅ **Zero config** - Reads directly from your `vercel.json`\n- 🔒 **Secure** - Supports `CRON_SECRET` authentication\n- 🎯 **Flexible** - Use as CLI or programmatically in your code\n- 🧪 **Testable** - Fully tested with 80%+ coverage\n- 📦 **Lightweight** - Minimal dependencies (only `node-cron`)\n- 🔍 **Filtering** - Run specific crons with pattern matching\n- 📊 **Stats** - Track execution success/failure rates\n\n## Installation\n\n```bash\n# As a dev dependency in your Next.js project (used with \"npx @bedev.io/nextjs-crons\" as a CLI tool)\nnpm install --save-dev @bedev.io/nextjs-crons\n\n# Or globally (recommended for using nextjs-crons as a CLI tool)\nnpm install -g @bedev.io/nextjs-crons\n```\n\n## Usage\n\n### CLI Mode\n\n```bash\n# Start all crons in watch mode\nnextjs-crons --url http://localhost:3000\n\n# Execute all crons once\nnextjs-crons --url http://localhost:3000 --once\n\n# With authentication\nnextjs-crons --url http://localhost:3000 --secret your-cron-secret\n\n# Filter specific crons\nnextjs-crons --url http://localhost:3000 --filter \"/api/crons/notifications/*\"\n\n# Execute a specific cron once\nnextjs-crons --url http://localhost:3000 --execute \"/api/crons/notify-happy-birthday\"\n\n# List all configured crons\nnextjs-crons --list\n\n# Verbose logging (simple)\nnextjs-crons --url http://localhost:3000 --verbose\n\n# Verbose logging (extended)\nnextjs-crons --url http://localhost:3000 -vv\n```\n\n### Programmatic Usage\n\n```typescript\nimport { CronRunner } from \"nextjs-crons\";\n\n// Basic usage\nconst runner = new CronRunner({\n  baseUrl: \"http://localhost:3000\",\n  cronSecret: process.env.CRON_SECRET,\n});\n\n// Start all crons\nawait runner.start();\n\n// Stop all crons\nrunner.stop();\n\n// Execute all crons once\nconst results = await runner.executeAll();\nconsole.log(results);\n\n// Execute a specific cron\nconst result = await runner.executeOne(\"/api/crons/notify-happy-birthday\");\nconsole.log(result);\n\n// Get statistics\nconst stats = runner.getStats();\nconsole.log(stats);\n\n// List configured jobs\nconst jobs = runner.listJobs();\nconsole.log(jobs);\n```\n\n### Advanced Options\n\n```typescript\nconst runner = new CronRunner({\n  // Required: Base URL of your Next.js application\n  baseUrl: \"http://localhost:3000\",\n\n  // Optional: Secret for cron authentication\n  // Defaults to process.env.CRON_SECRET\n  cronSecret: \"your-secret\",\n\n  // Optional: Path to vercel.json\n  // Defaults to './vercel.json'\n  configPath: \"./vercel.json\",\n\n  // Optional: Enable verbose logging\n  // Defaults to false\n  verbose: true,\n\n  // Optional: Filter crons by path pattern\n  // Supports wildcards (*)\n  filter: \"/api/crons/notifications/*\",\n});\n```\n\n## Configuration\n\nCreate a `vercel.json` in your project root:\n\n```json\n{\n  \"crons\": [\n    {\n      \"path\": \"/api/crons/daily-report\",\n      \"schedule\": \"0 8 * * *\"\n    },\n    {\n      \"path\": \"/api/crons/every-5-minutes\",\n      \"schedule\": \"*/5 * * * *\"\n    }\n  ]\n}\n```\n\n## Cron Schedule Format\n\nFollows standard cron syntax:\n\n```\n* * * * *\n│ │ │ │ │\n│ │ │ │ └─── Day of week (0-7, 0 or 7 is Sunday)\n│ │ │ └───── Month (1-12)\n│ │ └─────── Day of month (1-31)\n│ └───────── Hour (0-23)\n└─────────── Minute (0-59)\n```\n\nExamples:\n\n- `* * * * *` - Every minute\n- `*/5 * * * *` - Every 5 minutes\n- `0 8 * * *` - Every day at 8:00 AM\n- `0 0 * * 0` - Every Sunday at midnight\n\n## Authentication\n\nYour Next.js cron endpoints should validate the `CRON_SECRET`:\n\n```typescript\n// app/api/crons/example/route.ts\nimport { NextRequest, NextResponse } from \"next/server\";\n\nexport async function GET(request: NextRequest) {\n  // Verify cron secret\n  const authHeader = request.headers.get(\"authorization\");\n  const token = authHeader?.replace(\"Bearer \", \"\");\n\n  if (token !== process.env.CRON_SECRET) {\n    return NextResponse.json({ error: \"Unauthorized\" }, { status: 401 });\n  }\n\n  // Your cron logic here\n  console.log(\"Cron executed!\");\n\n  return NextResponse.json({ success: true });\n}\n```\n\n## CLI Options\n\n| Option               | Alias | Description                             |\n| -------------------- | ----- | --------------------------------------- |\n| `--url <url>`        | `-u`  | Base URL of your Next.js app (required) |\n| `--secret <secret>`  | `-s`  | Cron secret token                       |\n| `--config <path>`    | `-c`  | Path to vercel.json                     |\n| `--verbose`          | `-v`  | Enable verbose logging                  |\n| `--filter <pattern>` | `-f`  | Filter crons by path pattern            |\n| `--once`             | `-o`  | Execute all crons once and exit         |\n| `--list`             | `-l`  | List all configured crons               |\n| `--execute <path>`   | `-e`  | Execute a specific cron once            |\n| `--help`             | `-h`  | Show help message                       |\n\n## API Reference\n\n### `CronRunner`\n\n#### Constructor\n\n```typescript\nnew CronRunner(options: CronRunnerOptions)\n```\n\n#### Methods\n\n- `start(): Promise<void>` - Start all cron jobs in watch mode\n- `stop(): void` - Stop all running cron jobs\n- `executeAll(): Promise<CronExecutionResult[]>` - Execute all crons once\n- `executeOne(path: string): Promise<CronExecutionResult>` - Execute a specific cron\n- `getStats(): CronRunnerStats` - Get execution statistics\n- `listJobs(): CronJob[]` - Get list of configured cron jobs\n\n#### Types\n\n```typescript\ninterface CronRunnerOptions {\n  baseUrl: string;\n  cronSecret?: string;\n  configPath?: string;\n  verbose?: boolean;\n  filter?: string;\n}\n\ninterface CronExecutionResult {\n  path: string;\n  schedule: string;\n  success: boolean;\n  statusCode?: number;\n  error?: string;\n  timestamp: Date;\n  duration?: number;\n}\n\ninterface CronRunnerStats {\n  totalJobs: number;\n  successfulExecutions: number;\n  failedExecutions: number;\n  lastExecution?: Date;\n}\n```\n\n## Use Cases\n\n### Local Development\n\nRun crons while developing:\n\n```bash\n# In one terminal\nnpm run dev\n\n# In another terminal\nnpx nextjs-crons --url http://localhost:3000 --verbose\n```\n\n### Testing\n\nExecute crons manually during testing:\n\n```typescript\nimport { CronRunner } from \"nextjs-crons\";\n\ndescribe(\"Cron jobs\", () => {\n  it(\"should send daily report\", async () => {\n    const runner = new CronRunner({\n      baseUrl: \"http://localhost:3000\",\n    });\n\n    const result = await runner.executeOne(\"/api/crons/daily-report\");\n    expect(result.success).toBe(true);\n  });\n});\n```\n\n### CI/CD\n\nRun crons as part of your deployment pipeline:\n\n```yaml\n# .github/workflows/test.yml\n- name: Test crons\n  run: |\n    npm run dev &\n    npx nextjs-crons --url http://localhost:3000 --once\n```\n\n### Self-Hosted Environments\n\nRun crons in environments without Vercel:\n\n```bash\n# Docker, VPS, or any server\nnextjs-crons --url http://your-app.com --secret $CRON_SECRET\n```\n\n## Integration with package.json\n\nAdd scripts to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"crons\": \"nextjs-crons --url http://localhost:3000\",\n    \"crons:once\": \"nextjs-crons --url http://localhost:3000 --once\",\n    \"crons:list\": \"nextjs-crons --list\"\n  }\n}\n```\n\nThen run:\n\n```bash\nnpm run crons\n```\n\n## Troubleshooting\n\n### Crons not executing\n\n1. Ensure your Next.js app is running\n2. Check that `vercel.json` exists and is valid JSON\n3. Verify the cron paths are correct\n4. Enable verbose logging: `--verbose`\n\n### Authentication errors\n\n1. Set `CRON_SECRET` environment variable\n2. Or pass `--secret` flag\n3. Ensure your API routes validate the secret\n\n### Invalid cron schedule\n\nVerify your schedule follows cron syntax. Use tools like [crontab.guru](https://crontab.guru/) to validate.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a PR.\n\n## License\n\nMIT\n\n## Credits\n\nBuilt with:\n\n- [node-cron](https://github.com/node-cron/node-cron) - Cron scheduling\n\n---\n\nMade with ❤️ for the Next.js community\n","readmeFilename":"README.md"}