{"name":"@eggjs/tegg-schedule-decorator","version":"3.77.2","keywords":["egg","typescript","runtime","tegg"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/tegg-schedule-decorator@3.77.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":"niania","email":"ljracm@gmail.com"}],"homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"c891e1e31447bf61008967a313d7aa8b87541f7a","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-schedule-decorator/download/@eggjs/tegg-schedule-decorator-3.77.2.tgz","fileCount":15,"integrity":"sha512-Tg4F+LleNPeUKgkiCUXnQw8mSlHlidoyyKa3vbxYU55vgAXasZcBaYXUanPnHuW9LXcgc1jphAvwJyOfHgsa0A==","signatures":[{"sig":"MEUCIQDN9atCciG/e8Jy7CyBCmUUUq+knOKgwG7kXHEPFAd2/wIgcknlPsMJq9XFGziybpId8C2/S0qk22iuNJS53QVTdPs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16118,"size":5475,"noattachment":false,"key":"/@eggjs/tegg-schedule-decorator/-/@eggjs/tegg-schedule-decorator-3.77.2.tgz"},"main":"dist/index.js","engines":{"node":">=14.0.0"},"gitHead":"276c2d88a409343fedac73c5c9df46694ad36136","scripts":{"tsc":"ut run clean && tsc -p ./tsconfig.json","clean":"tsc -b --clean","tsc:pub":"ut run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"ut tsc:pub"},"typings":"dist/index.d.ts","_npmUser":{"name":"niania","email":"ljracm@gmail.com"},"repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/schedule-decorator"},"_npmVersion":"lerna/6.6.2/node@v20.20.2+x64 (linux)","description":"tegg schedule decorator","directories":{},"_nodeVersion":"20.20.2","dependencies":{"cron-parser":"^2.18.0","@eggjs/tegg-types":"^3.77.2","@eggjs/tegg-metadata":"^3.77.2","@eggjs/core-decorator":"^3.77.2","@eggjs/tegg-common-util":"^3.77.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","ts-node":"^10.9.1","cross-env":"^7.0.3","typescript":"^5.0.4","@types/node":"^20.2.4","@types/mocha":"^10.0.1","egg-schedule":"^3.6.6"},"_npmOperationalInternal":{"tmp":"tmp/tegg-schedule-decorator_3.77.2_1775533049130_0.43076857245198363","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":1775533049265,"_cnpm_publish_time":1775533049265,"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"}}