{"_id":"@alt-javascript/camel-lite-component-cron","_rev":"3-fab05c399e683d84787189c4d898af21","name":"@alt-javascript/camel-lite-component-cron","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.2":{"name":"@alt-javascript/camel-lite-component-cron","version":"1.0.2","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","cron","scheduler","timer","component"],"author":{"name":"Craig Parravicini"},"_id":"@alt-javascript/camel-lite-component-cron@1.0.2","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"},{"name":"Apache Camel — design inspiration and pattern source"}],"homepage":"https://github.com/alt-javascript/camel-lite#readme","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"dist":{"shasum":"77c8af9a286dd42ac1e6e6b00cf519037eac86cf","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-cron/-/camel-lite-component-cron-1.0.2.tgz","fileCount":7,"integrity":"sha512-xclL7vi8TSaYFA/S+VOS5qQl5isw4xDuP3B5mGvsVX9I4lFhdD0Ke2vKSh9FDM7674rMUphieYESRMyCfMbbSg==","signatures":[{"sig":"MEQCIDIfgPMcrOf4r8k2cx/eFqG/eozguqxIzey6f4GqST9SAiA1zXwMH24jtuWu7g2iDGCBXaYPUHwjIWpG79/ze89OKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-cron@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10420},"type":"module","exports":{".":"./src/index.js"},"gitHead":"9f948b9f02d85c9f593229684c475cd209369f2c","scripts":{"test":"node --test"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/camel-lite.git","type":"git"},"_npmVersion":"11.9.0","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"node-cron":"^4.0.0","@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","@alt-javascript/camel-lite-core":"1.0.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/camel-lite-component-cron_1.0.2_1774595593225_0.897559124771409","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alt-javascript/camel-lite-component-cron","version":"1.1.0","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","cron","scheduler","timer","component"],"author":{"name":"Craig Parravicini"},"_id":"@alt-javascript/camel-lite-component-cron@1.1.0","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"}],"homepage":"https://github.com/alt-javascript/camel-lite#readme","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"dist":{"shasum":"8d5e00ff1d88301ee273a0d2744e0012ecb9d325","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-cron/-/camel-lite-component-cron-1.1.0.tgz","fileCount":7,"integrity":"sha512-83K4Vw4bYfWfi7oLZp/HyDr88Hf+KN91pI33/K8CbZ7ZzmM7kUq0cxKmyl0hqeoX5Xnx0m3Z0WR1DyAhIcXtlg==","signatures":[{"sig":"MEUCIQDnpZw+shHzlVJSe/XMoWiYEPHv6tkshKEyP55DVnEfTAIgYg29amniZSmxv7hTBBvbXW9V3F4Dq/bBuZ6qSs3DQQ8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-cron@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10358},"type":"module","exports":{".":"./src/index.js"},"gitHead":"c227a03632d4b1e2f93b4562c7e74f52ba87d340","scripts":{"test":"node --test"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/camel-lite.git","type":"git"},"_npmVersion":"11.9.0","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"node-cron":"^4.0.0","@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","@alt-javascript/camel-lite-core":"1.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/camel-lite-component-cron_1.1.0_1774763498553_0.15654986848311414","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alt-javascript/camel-lite-component-cron","version":"1.1.1","type":"module","exports":{".":"./src/index.js"},"dependencies":{"@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","node-cron":"^4.0.0","@alt-javascript/camel-lite-core":"1.1.1"},"scripts":{"test":"node --test"},"repository":{"type":"git","url":"git+https://github.com/alt-javascript/camel-lite.git"},"author":{"name":"Craig Parravicini"},"contributors":[{"name":"Claude","url":"Anthropic"}],"keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","cron","scheduler","timer","component"],"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"gitHead":"ff8501eed381d38ac20f56aea721274466d64212","_id":"@alt-javascript/camel-lite-component-cron@1.1.1","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"homepage":"https://github.com/alt-javascript/camel-lite#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Dqn+q1F+1lRWv7y+Aeh9bIs3eQvYqo0Khidg1WlXuXGQdLq7Vw6wVBZCbxQCzeWzn7VsfpbDGzs5fsi8BHXuAA==","shasum":"3d40549b5edff7d78020739cae6b457f40e3e6b8","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-cron/-/camel-lite-component-cron-1.1.1.tgz","fileCount":7,"unpackedSize":10358,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-cron@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID47Mb0OJG3Dvo933E+gNT7XSKTOG6yPsjV5ToAl62JSAiAoyy44XjabV9pX57Gf7qo9UUSyvta3xJpetMLAiQK4bg=="}]},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"directories":{},"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/camel-lite-component-cron_1.1.1_1774764454084_0.18791302152429568"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T07:13:13.162Z","modified":"2026-03-29T06:07:34.530Z","1.0.2":"2026-03-27T07:13:13.365Z","1.1.0":"2026-03-29T05:51:38.696Z","1.1.1":"2026-03-29T06:07:34.220Z"},"bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"author":{"name":"Craig Parravicini"},"homepage":"https://github.com/alt-javascript/camel-lite#readme","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","cron","scheduler","timer","component"],"repository":{"type":"git","url":"git+https://github.com/alt-javascript/camel-lite.git"},"description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","contributors":[{"name":"Claude","url":"Anthropic"}],"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## What\n\nCron-scheduled exchange trigger via [`node-cron`](https://www.npmjs.com/package/node-cron). Fires at the times defined by a standard 5- or 6-field cron expression. The schedule is validated at endpoint construction — an invalid expression throws a `CamelError` before the context starts.\n\n## Install\n\n```sh\nnpm install camel-lite-component-cron\n```\n\n## URI Syntax\n\n```\ncron:name?schedule=<cron-expression>[&timezone=UTC]\n```\n\nURL-encode spaces in the cron expression as `+`.\n\n| Parameter  | Default | Description |\n|------------|---------|-------------|\n| `schedule` | *(required)* | 5-field (`* * * * *`) or 6-field (`* * * * * *`) cron expression with spaces encoded as `+`. Validated by `node-cron` at construction. |\n| `timezone` | `UTC`   | IANA timezone name (e.g. `America/New_York`). |\n\n### Headers Set on Each Exchange\n\n| Header               | Type     | Description |\n|----------------------|----------|-------------|\n| `CamelCronName`      | `string` | The cron name from the URI. |\n| `CamelCronFiredTime` | `Date`   | Timestamp of the scheduled firing. |\n\n## Usage\n\n```js\nimport { CamelContext } from 'camel-lite-core';\nimport { CronComponent } from 'camel-lite-component-cron';\nimport { DirectComponent } from 'camel-lite-component-direct';\n\nconst context = new CamelContext();\ncontext.addComponent('cron', new CronComponent());\ncontext.addComponent('direct', new DirectComponent());\n\ncontext.addRoutes({\n  configure(ctx) {\n    // Fires at midnight UTC every day\n    ctx.from('cron:midnight?schedule=0+0+0+*+*+*')\n      .to('direct:dailyJob');\n\n    ctx.from('direct:dailyJob')\n      .process(exchange => {\n        console.log('Daily job triggered at', exchange.in.getHeader('CamelCronFiredTime'));\n      });\n  }\n});\n\nawait context.start();\n```\n\n## See Also\n\n[camel-lite — root README](../../README.md)\n","readmeFilename":"README.md"}