{"name":"@eggjs/schedule-decorator","version":"4.0.2-beta.26","description":"tegg schedule decorator","keywords":["egg","runtime","tegg","typescript"],"homepage":"https://github.com/eggjs/egg/tree/next/tegg/core/schedule-decorator","bugs":{"url":"https://github.com/eggjs/egg/issues"},"license":"MIT","author":{"name":"killagu","email":"killa123@126.com"},"repository":{"type":"git","url":"git+https://github.com/eggjs/egg.git","directory":"tegg/core/schedule-decorator"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./package.json":"./package.json"},"publishConfig":{"access":"public","exports":{".":"./dist/index.js","./package.json":"./package.json"}},"scripts":{"typecheck":"tsgo --noEmit"},"dependencies":{"@eggjs/core-decorator":"4.0.2-beta.26","@eggjs/tegg-common-util":"4.0.2-beta.26","@eggjs/tegg-types":"4.0.2-beta.26"},"devDependencies":{"@types/node":"^24.10.2","typescript":"^5.9.3"},"engines":{"node":">=22.18.0"},"readmeFilename":"README.md","gitHead":"2b18475d501defd6f3b7b2c42e02426c1c3e0f84","_id":"@eggjs/schedule-decorator@4.0.2-beta.26","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-+1J64+5iZPAhNAZSsrsAuL4GSmGf3sHPfsbKkpHdTpz2JQfpjYG4xf7npmRWybHEJMEW/3veBu/pCcz3BkE8iA==","shasum":"1a53684eefdb73e685d9b839abe8420727330dda","tarball":"http://registry-npm.ywwl.com/@eggjs/schedule-decorator/download/@eggjs/schedule-decorator-4.0.2-beta.26.tgz","fileCount":21,"unpackedSize":10159,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2fschedule-decorator@4.0.2-beta.26","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDYKFBiFSpz9bPLjpw1luMQGYdy3jAGWyJnQxuuFwilBAiEAiInsx6hUZZ+X3/ziN19i39Ebl8tuL3xM7twzxmb6TQU="}],"size":2898,"noattachment":false,"key":"/@eggjs/schedule-decorator/-/@eggjs/schedule-decorator-4.0.2-beta.26.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8a33a099-383a-47be-aa07-488cad033a38"}},"directories":{},"maintainers":[{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"akitasummer","email":"644171127@qq.com"},{"name":"elrrrrrrr","email":"elrrrrrrr@gmail.com"},{"name":"niania","email":"ljracm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/schedule-decorator_4.0.2-beta.26_1786086915547_0.5672169734976935"},"_hasShrinkwrap":false,"readme":"# `@eggjs/schedule-decorator`\n\n[![NPM version][npm-image]][npm-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/@eggjs/schedule-decorator.svg?style=flat)](https://nodejs.org/en/download/)\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/schedule-decorator.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/schedule-decorator\n[snyk-image]: https://snyk.io/test/npm/@eggjs/schedule-decorator/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/@eggjs/schedule-decorator\n[download-image]: https://img.shields.io/npm/dm/@eggjs/schedule-decorator.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/schedule-decorator\n\n## Install\n\n```shell\nnpm i --save @eggjs/schedule-decorator\n```\n\n## Define schedule subscriber\n\n```ts\nimport { Schedule } from '@eggjs/tegg';\n\n// use number to define schedule interval\n@Schedule<IntervalParams>({\n  type: ScheduleType.WORKER,\n  scheduleData: {\n    // run every 100ms\n    interval: 100,\n  },\n})\nexport class FooSubscriber {\n  @Inject()\n  private readonly logger: EggLogger;\n\n  async subscribe() {\n    this.logger.info('schedule called');\n  }\n}\n\n// use cron to define schedule interval\n@Schedule<CronParams>({\n  type: ScheduleType.WORKER,\n  scheduleData: {\n    cron: '0 0 3 * * *',\n  },\n})\nexport class FooSubscriber {\n  @Inject()\n  private readonly logger: EggLogger;\n\n  async subscribe() {\n    this.logger.info('schedule called');\n  }\n}\n```\n","publish_time":1786086915681,"_cnpm_publish_time":1786086915681,"dist-tags":{"beta":"4.0.2-beta.27","latest":"4.1.0","rc":"4.0.2-rc.1"}}