{"_id":"@aws-blocks/bb-cron-job","_rev":"8-c3ff267b5a76f5d8772abaf1c5b85b07","name":"@aws-blocks/bb-cron-job","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@aws-blocks/bb-cron-job","version":"0.1.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"7e4ee84e76a89d57324edd0cf20c7740a4cab8de","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.0.tgz","fileCount":39,"integrity":"sha512-24d1H8xcIzAAAl3x+oUNtFPRXwvW21wnhkhXQng+oMtW/tusxPqzjqc6MdqThtlaeO7Zf3TCViNVoHZx7eSQ9A==","signatures":[{"sig":"MEUCICesrfy7MwdnyYSYR+aUYyfNBfeJSK+va8ABdbXg/drKAiEAgMqY9w/n04LXwEKFZcsERSQfCOjKHlCPTMBE0g0zDBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69948},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"639f6fad510d473abd72286351b3294a646d9895","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.0","@aws-blocks/bb-logger":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.0_1781566777093_0.5705378508411891","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aws-blocks/bb-cron-job","version":"0.1.1","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.1","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"0ac98378613542fe8741df3381314728c6ceb063","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.1.tgz","fileCount":39,"integrity":"sha512-UD82CfRGyOCkutQZvwGCl4ZNjfb1XFSmwfqpsobHEs7EJdA4VuY4edOR7EuN5J9AWW/s0sfV9DFgFoOTGNzQ/Q==","signatures":[{"sig":"MEYCIQCnBUmpDB+lkT/MTDXzBF4OhhgT1XhILNG1G+7F/ulaywIhAK6vCzNqVjDHneNGThiXji2yWy1HZu+2FEPj2dGLgE7w","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69954},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"ed3e0ad5724d28c2a2fb0ea9207dfc9e941257f9","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-blocks/bb-logger":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.1_1781633782256_0.7453318213612692","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aws-blocks/bb-cron-job","version":"0.1.2","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.2","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"833028d3c97de10b686c59cd2503114551ff8a30","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.2.tgz","fileCount":39,"integrity":"sha512-E6eFauvLX1zlIjmlwJuR6jJngAk6w55rdiOOAJgnQi0Vg2TSwzYCPQOZXgy3jPy5EygxeEyOyoq94AF144o+WA==","signatures":[{"sig":"MEYCIQDXGKSn0qZysUwkKUI4FP9+TAqAMXna9KIW5tuBNDdh2gIhAPd94LTKKMc1YDlse6ys/ziLsDYrr4UqmGFMCvApiCGV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76045},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"2b517f0a47f5f56751c0765052468e857ce300ec","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-blocks/bb-logger":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.2_1781912996248_0.6078856224327076","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aws-blocks/bb-cron-job","version":"0.1.3","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.3","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"dist":{"shasum":"6fafebd300de96ca6acf9038703809d1b988266a","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.3.tgz","fileCount":40,"integrity":"sha512-Dn57jjngmTKel0PtauCbFUundjckAtw+MtEpj7etH5nC22Aj3wGm4J8sbWcr71PFVwTY1MBXo1m2YBh2ceX1EQ==","signatures":[{"sig":"MEUCIQCn7I8BbphV9iuQlT/n/duTbjf9sSWYqGG8154jgx28awIgGuwzimPR+2gWWlvqHmpgI6zs7If201C+SjnxRc7iowo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":87501},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"3328f36992d39dc20b0c0d760e4a38c866ddfbbd","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@aws-blocks/core":"^0.1.1","@aws-blocks/bb-logger":"^0.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.3_1782192243682_0.9969357125022578","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aws-blocks/bb-cron-job","version":"0.1.4","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.4","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-cron-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"4ec60a58bb791f015d772d8b14efe6efd6c7ef08","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.4.tgz","fileCount":40,"integrity":"sha512-nGwV0NnEQqk3is5VmBbBbRs2NmrCY4YB8zBnAv2msrtcxqf+wMC4dwK0VkNMuN5l4+STOlVb3bfBhIswcLDIEw==","signatures":[{"sig":"MEUCIQDwsDbwT2D+lBv243Vv5uaVk1JfirhH7rvaEMmfam+muQIgQTlp2JQLFI3yqGZm+aE2P1+GNK9PXzabbFtj+t1QYmk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-cron-job@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":87841},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"164b106810e2b4f7801426158feae82a4ccbe3d4","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-cron-job"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.2.0","@aws-blocks/bb-logger":"^0.1.4"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.4_1787230453608_0.2949405778322931","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@aws-blocks/bb-cron-job","version":"0.1.5","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.1.5","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-cron-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"276e6c5dae76d745f1d3e067bb8a67c8af4199a7","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.1.5.tgz","fileCount":40,"integrity":"sha512-RHPpvBemdo6xebn9R6ivA1f2I3W1ntJmE595KvxWZM7zx9+JtlF1+UFKNi1E1gPHjvqaBCpYygLaQqKKFysHeQ==","signatures":[{"sig":"MEUCIQCT320UIpF70Sj3sSNpfx4R4uEEkOb0O+r5ASd5OfcNJwIge+HPWRtuH+NfwsBrXRMC/uCRiG1PSDD2xypW2/unfio=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-cron-job@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":87841},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"04d4b21b1cae9600c44a2fc63c0020ca21894316","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-cron-job"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.3.0","@aws-blocks/bb-logger":"^0.1.5"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.1.5_1788264346972_0.9917822040936068","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aws-blocks/bb-cron-job","version":"0.2.0","author":{"name":"Amazon Web Services"},"license":"Apache-2.0","_id":"@aws-blocks/bb-cron-job@0.2.0","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-cron-job#readme","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"d116da46b67aa7eac653d99f07aeefa0c33f07a8","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.2.0.tgz","fileCount":52,"integrity":"sha512-eiAf8kJsNcKe+G7Rtp4v02+36XIybIVKroUKnPyPvxly54+Ff4JuoF9MJp7Ab8NMVxWmlv+ZzidpTQ7kN1UvAg==","signatures":[{"sig":"MEUCIB70LdAfIZei+rRaB5jp6NFlAfJQIg/dXRKtlG4JlPVWAiEAqnog+LEILlWjCWTqTu+M2DlUmC0Hxc4/qafP9Wz1J4g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-cron-job@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":127424},"type":"module","exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"ce01923c591828486e07d3d3f2b6b9d585e39057","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-cron-job"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.4.0","@aws-blocks/bb-logger":"^0.1.6","@aws-blocks/bb-lambda-compute":"^0.4.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"tmp":"tmp/bb-cron-job_0.2.0_1788867487413_0.048748298829311976","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@aws-blocks/bb-cron-job@0.2.1","bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"dist":{"shasum":"9071d7f7ce43e200fd291cf066fa7e22c2d8db9b","tarball":"https://registry.npmjs.org/@aws-blocks/bb-cron-job/-/bb-cron-job-0.2.1.tgz","fileCount":52,"integrity":"sha512-StEmmLJqZOO3cwffrM/2v8DU54kzb/LeyhU5llFEAv1uFyBscnzwU9ADp8Ya2azJeZ323kQHK/4jJrTbOPQ67w==","signatures":[{"sig":"MEUCIQCtC2PQvfbDmdPEBm4xDY7FLa1S9JLRg8QgmLlqsynDpwIgTOy6sH9PAVvbOB8/9rOuo5bn1FernXXnJh2ejU2lPcw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEjoMr5A5bNAgPhY+7uNHXHJOvcidLgPOWc6DNSa7wn+AiALd7OFBn94v0pNN1LeMu5/7sXrsxhIpAOXgKCZRshvgA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aws-blocks%2fbb-cron-job@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":128111},"name":"@aws-blocks/bb-cron-job","type":"module","author":{"name":"Amazon Web Services"},"exports":{".":{"cdk":{"types":"./dist/index.cdk.d.ts","default":"./dist/index.cdk.js"},"hooks":"./dist/index.hooks.js","types":"./dist/index.mock.d.ts","browser":"./dist/index.browser.js","default":"./dist/index.mock.js","aws-runtime":"./dist/index.aws.js"}},"gitHead":"51eeb265ab5efdbd853e989cf8bd6d30951c29c7","license":"Apache-2.0","scripts":{"test":"node --test --test-force-exit dist/**/*.test.js","build":"tsc --build","prebuild":"node ../../scripts/generate-version.mjs CronJob"},"version":"0.2.1","_npmUser":{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"},"homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-cron-job#readme","keywords":["aws-blocks","cron","scheduler","eventbridge","lambda"],"repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-cron-job"},"_npmVersion":"10.9.8","description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","directories":{},"maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"_nodeVersion":"22.23.2","dependencies":{"@aws-blocks/core":"^0.5.0","@aws-blocks/bb-logger":"^0.2.0","@aws-blocks/bb-lambda-compute":"^0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"constructs":"^10.0.0","aws-cdk-lib":"^2.257.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bb-cron-job_0.2.1_1789678816654_0.6239611806819028"}}},"time":{"created":"2026-06-15T23:39:36.857Z","modified":"2026-09-17T21:00:17.024Z","0.1.0":"2026-06-15T23:39:37.249Z","0.1.1":"2026-06-16T18:16:22.395Z","0.1.2":"2026-06-19T23:49:56.381Z","0.1.3":"2026-06-23T05:24:03.830Z","0.1.4":"2026-08-20T12:54:13.744Z","0.1.5":"2026-09-01T12:05:47.108Z","0.2.0":"2026-09-08T11:38:07.536Z","0.2.1":"2026-09-17T21:00:16.732Z"},"bugs":{"url":"https://github.com/aws-devtools-labs/aws-blocks/issues"},"author":{"name":"Amazon Web Services"},"license":"Apache-2.0","homepage":"https://github.com/aws-devtools-labs/aws-blocks/tree/main/packages/bb-cron-job#readme","repository":{"url":"git+https://github.com/aws-devtools-labs/aws-blocks.git","type":"git","directory":"packages/bb-cron-job"},"description":"Scheduled task execution backed by EventBridge Scheduler and Lambda.","maintainers":[{"name":"aws-blocks-npm-ops","email":"aws-blocks@amazon.com"}],"readme":"# @aws-blocks/bb-cron-job\n\nScheduled task execution backed by EventBridge Scheduler and Lambda.\n\n> Design & mock parity details: [DESIGN.md](./DESIGN.md)\n\n## Quick Reference\n\n**Common Operations → Configuration**\n\n| What you want | How to configure |\n|---------------|-----------------|\n| Run every N minutes | `schedule: 'rate(5 minutes)'` |\n| Run every hour | `schedule: 'rate(1 hour)'` |\n| Run daily at 9 AM UTC | `schedule: 'cron(0 9 * * ? *)'` |\n| Run daily at 9 AM Pacific | `schedule: 'cron(0 9 * * ? *)', timezone: 'America/Los_Angeles'` |\n| Pass data to handler | `input: { mode: 'full' }` |\n| Disable until manually triggered | `enabled: false` |\n\n**Keywords:** cron, schedule, timer, periodic, recurring, rate, EventBridge, background, interval\n\n## Quick Start\n\n```typescript\nimport { Scope } from '@aws-blocks/core';\nimport { CronJob } from '@aws-blocks/bb-cron-job';\n\nconst scope = new Scope('my-app');\n\nconst cleanup = new CronJob(scope, 'cleanup', {\n  schedule: 'rate(1 hour)',\n  handler: async (event) => {\n    console.log(`Running cleanup at ${event.scheduledTime}`);\n    await deleteExpiredRecords();\n  },\n});\n```\n\n## When to Use\n\n- Running periodic cleanup tasks (expired sessions, stale data)\n- Generating scheduled reports\n- Cache warming on a timer\n- Data synchronization between systems\n- Periodic health checks or monitoring\n\n## When NOT to Use\n\n- One-off async tasks triggered by events or user actions → use `AsyncJob`\n- Reacting to data changes → use event subscriptions on the relevant Building Block\n\n## Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `schedule` | `string` | (required) | Cron or rate expression (see Schedule Expressions below) |\n| `handler` | `(event: CronJobEvent<T>) => Promise<void>` | (required) | Function to execute on each invocation. Must be idempotent. |\n| `enabled` | `boolean` | `true` | Whether the schedule is active |\n| `description` | `string` | — | Human-readable description of the job |\n| `timezone` | `string` | `'UTC'` | IANA timezone for cron expressions (e.g., `'America/Los_Angeles'`) |\n| `input` | `T` | — | Static payload passed to the handler on every invocation |\n\n## Schedule Expressions\n\n### Rate Expressions\n\nSimple interval-based schedules:\n\n```\nrate(1 minute)\nrate(5 minutes)\nrate(1 hour)\nrate(12 hours)\nrate(1 day)\nrate(7 days)\n```\n\n### Cron Expressions\n\nAWS EventBridge cron format (6 fields): `cron(minute hour day-of-month month day-of-week year)`\n\n```\ncron(0 9 * * ? *)       → daily at 9:00 AM\ncron(0 */2 * * ? *)     → every 2 hours\ncron(30 9 ? * MON-FRI *) → weekdays at 9:30 AM\ncron(0 0 1 * ? *)       → first day of every month at midnight\n```\n\nUse `?` for either day-of-month or day-of-week (one must be `?`).\n\n## Handler Event\n\nThe handler receives a `CronJobEvent<T>` with:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `scheduledTime` | `string` | ISO 8601 timestamp of the scheduled invocation time |\n| `jobName` | `string` | The CronJob's fully-qualified id |\n| `input` | `T` | Static input configured on the CronJob (`undefined` when no input is provided) |\n\n## Error Constants\n\n```typescript\nimport { CronJobErrors } from '@aws-blocks/bb-cron-job';\n\nCronJobErrors.InvalidSchedule  // schedule expression is not a valid cron or rate format\nCronJobErrors.InvalidTimezone  // timezone string is not a valid IANA timezone\n```\n\nBoth errors are thrown at construction time (fail-fast validation).\n\n## Examples\n\n### Cron Schedule with Timezone\n\n```typescript\nconst dailyReport = new CronJob(scope, 'daily-report', {\n  schedule: 'cron(0 9 * * ? *)',\n  timezone: 'America/Los_Angeles',\n  description: 'Generate and email daily analytics report at 9 AM Pacific',\n  handler: async (event) => {\n    const data = await analytics.query({ date: event.scheduledTime });\n    await email.send('team@example.com', 'Daily Report', formatReport(data));\n  },\n});\n```\n\n### Typed Input\n\n```typescript\nnew CronJob<{ keys: string[] }>(scope, 'cache-warmer', {\n  schedule: 'rate(5 minutes)',\n  input: { keys: ['top-products', 'featured'] },\n  handler: async (event) => {\n    for (const key of event.input.keys) {\n      await warmCache(key);\n    }\n  },\n});\n```\n\n### Disabled Job (Manual-Only in Dev)\n\n```typescript\nconst migration = new CronJob(scope, 'data-migration', {\n  schedule: 'rate(1 day)',\n  enabled: false,\n  handler: async () => {\n    await migrateRecords();\n  },\n});\n```\n\n### Handler Accessing Other Building Blocks\n\n```typescript\nconst store = new KVStore(scope, 'sessions');\n\nconst sessionCleanup = new CronJob(scope, 'session-cleanup', {\n  schedule: 'rate(1 hour)',\n  handler: async () => {\n    const now = Date.now();\n    for await (const session of store.scan()) {\n      if (session.expiresAt < now) {\n        await store.delete(session.key);\n      }\n    }\n  },\n});\n```\n\n### Multiple Schedules for One Handler\n\n```typescript\nconst syncHandler = async (event: CronJobEvent<{ mode: string }>) => {\n  if (event.input.mode === 'incremental') await syncIncremental();\n  else await syncFull();\n};\n\nnew CronJob<{ mode: string }>(scope, 'sync-hourly', {\n  schedule: 'rate(1 hour)',\n  input: { mode: 'incremental' },\n  handler: syncHandler,\n});\n\nnew CronJob<{ mode: string }>(scope, 'sync-daily', {\n  schedule: 'cron(0 9 * * ? *)',\n  input: { mode: 'full' },\n  handler: syncHandler,\n});\n```\n\n## Best Practices\n\n- **Idempotency:** EventBridge provides at-least-once delivery. Design handlers to tolerate duplicate invocations.\n- **Rate expressions** for simple intervals; **cron expressions** for precise timing.\n- **Concurrent executions:** If a handler runs longer than the schedule interval, the next invocation starts while the previous is still running. Design for overlap or implement application-level locking with `KVStore`.\n- **Failure handling:** Handler exceptions are retried by Lambda's built-in async invoke retry policy (2 retries with exponential backoff). After retries exhaust, the error is logged to CloudWatch.\n\n## Local Development\n\nIn local dev mode, CronJob runs schedules in-process:\n\n- Rate schedules use `setInterval`\n- Cron schedules calculate the next fire time with timezone support and use `setTimeout`\n- Console logs when the job fires: `[CronJob:{id}] triggered at {timestamp}`\n- When `enabled: false`, the schedule does not run automatically\n- Failed handlers are logged with a warning that AWS would retry\n\n## AWS Deployment\n\nAutomatically provisions:\n\n- **EventBridge Schedule:** One `AWS::Scheduler::Schedule` per CronJob instance\n- **Shared Lambda:** Targets the shared Lambda (same as API handlers and AsyncJob). No dedicated Lambda per job.\n- **IAM role:** Per-stack EventBridge Scheduler role with `lambda:InvokeFunction` permission\n- **Schedule name:** Derived from the CronJob's `fullId` (truncated to 64 chars)\n\n## Key Distinction from AsyncJob\n\nCronJob is a **pure infrastructure declaration** — the constructor defines the schedule and handler. There are no runtime methods like `submit()` or `submitBatch()`. The handler runs on the schedule automatically.\n\n| | CronJob | AsyncJob |\n|-|---------|----------|\n| Trigger | Time-based (cron/rate) | Programmatic (`submit()`) |\n| Runtime methods | None | `submit()`, `submitBatch()` |\n| Use case | Periodic recurring tasks | One-off event-driven work |\n| AWS service | EventBridge Scheduler | SQS + Lambda |\n","readmeFilename":"README.md","keywords":["aws-blocks","cron","scheduler","eventbridge","lambda"]}