{"name":"@eggjs/tegg-schedule-decorator","version":"4.0.0-beta.5","keywords":["egg","typescript","runtime","tegg"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/tegg-schedule-decorator@4.0.0-beta.5","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/tegg/tree/next/core/schedule-decorator","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"4a0e295b2fea55e34feb629660a91d299c3495ab","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-schedule-decorator/download/@eggjs/tegg-schedule-decorator-4.0.0-beta.5.tgz","fileCount":18,"integrity":"sha512-at5ncMu//cJnWddGWN6j3epA2kRBiqxUT4BAtnLv03CeFQ/6rEtCFYaE7OCpTaocOkzFhPpgRHULSqbwwlVBaQ==","signatures":[{"sig":"MEUCIB7dlq3NA3q0yMird6AgUZEurU/LvtCIs97KOFXwQMEBAiEA3WaiIKasA4pDkV75OOBx2GyWfTm4PHtbdqVF4eYkNlY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2ftegg-schedule-decorator@4.0.0-beta.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10899,"size":3583,"noattachment":false,"key":"/@eggjs/tegg-schedule-decorator/-/@eggjs/tegg-schedule-decorator-4.0.0-beta.5.tgz"},"main":"./dist/index.js","type":"module","_from":"file:eggjs-tegg-schedule-decorator-4.0.0-beta.5.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","clean":"rimraf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f4dabf2d-e0d9-4423-a1a6-fc45f5bc16e4"}},"_resolved":"/tmp/3d8610ee8ce04785c239f0f9504d12d1/eggjs-tegg-schedule-decorator-4.0.0-beta.5.tgz","_integrity":"sha512-at5ncMu//cJnWddGWN6j3epA2kRBiqxUT4BAtnLv03CeFQ/6rEtCFYaE7OCpTaocOkzFhPpgRHULSqbwwlVBaQ==","repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/schedule-decorator"},"_npmVersion":"11.6.1","description":"tegg schedule decorator","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@eggjs/tegg-types":"4.0.0-beta.5","@eggjs/core-decorator":"4.0.0-beta.5","@eggjs/tegg-common-util":"4.0.0-beta.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsdown":"^0.15.6","typescript":"^5.9.3","@types/node":"^22.10.5","unplugin-unused":"^0.5.3"},"_npmOperationalInternal":{"tmp":"tmp/tegg-schedule-decorator_4.0.0-beta.5_1759570508313_0.8940095598601323","host":"s3://npm-registry-packages-npm-production"},"readme":"# `@eggjs/tegg-schedule-decorator`\n\n## Install\n\n```shell\nnpm i --save @eggjs/tegg-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":1759570508500,"_cnpm_publish_time":1759570508500,"dist-tags":{"alpha":"3.57.15-alpha.0","beta":"3.73.0-beta.1","beta-v3":"3.74.0-beta.3","latest":"3.88.1"}}