{"name":"@eggjs/tegg-schedule-decorator","version":"3.43.2","description":"tegg schedule decorator","main":"dist/index.js","typings":"dist/index.d.ts","keywords":["egg","typescript","runtime","tegg"],"scripts":{"clean":"tsc -b --clean","tsc":"npm run clean && tsc -p ./tsconfig.json","tsc:pub":"npm run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"npm run tsc:pub"},"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/tegg.git","directory":"core/schedule-decorator"},"engines":{"node":">=14.0.0"},"dependencies":{"@eggjs/core-decorator":"^3.43.2","@eggjs/tegg-common-util":"^3.43.2","@eggjs/tegg-metadata":"^3.43.2","@eggjs/tegg-types":"^3.43.2","cron-parser":"^2.18.0"},"devDependencies":{"@types/mocha":"^10.0.1","@types/node":"^20.2.4","cross-env":"^7.0.3","egg-schedule":"^3.6.6","mocha":"^10.2.0","ts-node":"^10.9.1","typescript":"^5.0.4"},"publishConfig":{"access":"public"},"gitHead":"6e13b2697b3356681ca649b0d89d4b88163694dd","_id":"@eggjs/tegg-schedule-decorator@3.43.2","_nodeVersion":"20.17.0","_npmVersion":"lerna/6.6.2/node@v20.17.0+arm64 (darwin)","dist":{"integrity":"sha512-LRUUwtzrVEVPkWsEoDK8gsXjmxtD5IVPOTQ4MrIT4ubmVoUuHstZ+XFC2ZPWgCRDrVtu87rfeN4962S15gTKCg==","shasum":"d671d9ffe37e52d63da9c3c75da85c5a27414814","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-schedule-decorator/download/@eggjs/tegg-schedule-decorator-3.43.2.tgz","fileCount":15,"unpackedSize":16125,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDplRJ6dCxHFBAwYXt9ylMvh4c+AyhkOkOS/oYyscK76AiEA+drgcvDdCqpRXVorpsRRMoTyQpax0rvXltewMGlN0Gc="}],"size":5476,"noattachment":false,"key":"/@eggjs/tegg-schedule-decorator/-/@eggjs/tegg-schedule-decorator-3.43.2.tgz"},"_npmUser":{"name":"killagu","email":"killa07071201@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tegg-schedule-decorator_3.43.2_1726318266922_0.7640188346494656"},"_hasShrinkwrap":false,"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":1726318267131,"maintainers":[{"name":"akitasummer","email":"644171127@qq.com"},{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"wanghx","email":"whxaxes@gmail.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},{"name":"hubcarl","email":"hubcarl@126.com"}],"_cnpm_publish_time":1726318267131,"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"}}