{"name":"@eggjs/schedule-decorator","version":"4.0.2","keywords":["egg","runtime","tegg","typescript"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/schedule-decorator@4.0.2","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"}],"homepage":"https://github.com/eggjs/egg/tree/next/tegg/core/schedule-decorator","bugs":{"url":"https://github.com/eggjs/egg/issues"},"dist":{"shasum":"e9ebfe9df658eb9149c91d378cfa643679c00a1e","tarball":"http://registry-npm.ywwl.com/@eggjs/schedule-decorator/download/@eggjs/schedule-decorator-4.0.2.tgz","fileCount":21,"integrity":"sha512-OMeknmjEPLfyQhGeimMcD3+kiBIbF2Z2A1m1CQvxiL3Vt/p/ANLnoqioLkcBNl3uNh40SQ+XLvzKgrvc++ax+Q==","signatures":[{"sig":"MEUCIQDP1fbjqSUMGpDgpvJyg0C/W6Z/mGbSf02Aj5RtmaGSdQIgYEj9empuuhUpZzT/RWexH0EUjjEfsVXHA3G0Okxez+M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIH7Pqh0NGoZIpEhSu6u2S6+yj1X5E8IdYunTRmmY3S6GAiBu5dtk3vr3i1+CszsbhpfSuJtKpicDqP2dNz3QEv+iYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2fschedule-decorator@4.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10146,"size":2869,"noattachment":false,"key":"/@eggjs/schedule-decorator/-/@eggjs/schedule-decorator-4.0.2.tgz"},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"gitHead":"cd042a2c1fa06414f4f3290240a92a0e528b24c3","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"933d61ed-9724-41d3-998c-c2b468fe24af"}},"repository":{"url":"git+https://github.com/eggjs/egg.git","type":"git","directory":"tegg/core/schedule-decorator"},"_npmVersion":"11.19.0","description":"tegg schedule decorator","directories":{},"_nodeVersion":"24.21.0","dependencies":{"@eggjs/tegg-types":"4.0.2","@eggjs/core-decorator":"4.0.2","@eggjs/tegg-common-util":"4.0.2"},"publishConfig":{"access":"public","exports":{".":"./dist/index.js","./package.json":"./package.json"}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.10.2"},"_npmOperationalInternal":{"tmp":"tmp/schedule-decorator_4.0.2_1791297262120_0.4950665686561473","host":"s3://npm-registry-packages-npm-production"},"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":1791297262209,"_cnpm_publish_time":1791297262209,"dist-tags":{"beta":"4.0.2-beta.27","latest":"4.1.0","rc":"4.0.2-rc.1"}}