{"name":"@eggjs/schedule-decorator","version":"4.0.0-beta.31","keywords":["egg","typescript","runtime","tegg"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/schedule-decorator@4.0.0-beta.31","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":"akitasummer@outlook.com"}],"homepage":"https://github.com/eggjs/egg/tree/next/tegg/core/schedule-decorator","bugs":{"url":"https://github.com/eggjs/egg/issues"},"dist":{"shasum":"9d579276ca1cc15264755ff1eeb987093f17629a","tarball":"http://registry-npm.ywwl.com/@eggjs/schedule-decorator/download/@eggjs/schedule-decorator-4.0.0-beta.31.tgz","fileCount":23,"integrity":"sha512-0VzCX8m9WwTHBoqUa6RuJC8Oqq6nzT/xXs45fV67OFn5DK3J5d6XDK2gr8ydKjgUjV9vNhNkCkMD10x1UQlGQg==","signatures":[{"sig":"MEUCIAtTVgU5mEomxHVKIAbClkwP9I07SNNxC0EQfJGU/wRwAiEAh91bsTjYRlGNDPnaCjRlXsSQ+jm+aGI8UZupQjr3AUs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2fschedule-decorator@4.0.0-beta.31","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16556,"size":5526,"noattachment":false,"key":"/@eggjs/schedule-decorator/-/@eggjs/schedule-decorator-4.0.0-beta.31.tgz"},"main":"./dist/index.js","type":"module","_from":"file:eggjs-schedule-decorator-4.0.0-beta.31.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22.18.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"build":"tsdown && npm run clean && tsc -p tsconfig.build.json","clean":"rimraf dist *.tsbuildinfo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8a33a099-383a-47be-aa07-488cad033a38"}},"_resolved":"/tmp/4e89c07b40965e3e9cbec03ac52ac35c/eggjs-schedule-decorator-4.0.0-beta.31.tgz","_integrity":"sha512-0VzCX8m9WwTHBoqUa6RuJC8Oqq6nzT/xXs45fV67OFn5DK3J5d6XDK2gr8ydKjgUjV9vNhNkCkMD10x1UQlGQg==","repository":{"url":"git+ssh://git@github.com/eggjs/egg.git","type":"git","directory":"tegg/core/schedule-decorator"},"_npmVersion":"11.6.2","description":"tegg schedule decorator","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@eggjs/tegg-types":"4.0.0-beta.31","@eggjs/core-decorator":"4.0.0-beta.31","@eggjs/tegg-common-util":"4.0.0-beta.31"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdown":"0.15.10","typescript":"^5.9.3","@types/node":"^24.9.1","unplugin-unused":"^0.5.4"},"_npmOperationalInternal":{"tmp":"tmp/schedule-decorator_4.0.0-beta.31_1761578154174_0.19454749653013526","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":1761578154867,"_cnpm_publish_time":1761578154867,"dist-tags":{"beta":"4.0.2-beta.27","latest":"4.1.0","rc":"4.0.2-rc.1"}}