{"name":"@eggjs/tegg-schedule-decorator","version":"3.37.3","keywords":["egg","typescript","runtime","tegg"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/tegg-schedule-decorator@3.37.3","homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"9c1b20737a3461015a766e98c15408d192dbb8c9","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-schedule-decorator/download/@eggjs/tegg-schedule-decorator-3.37.3.tgz","fileCount":15,"integrity":"sha512-vhoCT+ilGQjT3+mB60rnAm78+9OiMrrdH6oOwPMhxuTrOerfeqCmaUqbM1dot+Vz+xiEAaW7c0QsxyaZcgB3zw==","signatures":[{"sig":"MEYCIQDHjqtusnJ9m56jQsl0QedfKqIdWNHUQZuYRnKXPGPx1wIhAML/qnonQBX4ntVJb9P2vXkjvsHd0eCWWCsDNvYIwi/V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16152,"size":5470,"noattachment":false,"key":"/@eggjs/tegg-schedule-decorator/-/@eggjs/tegg-schedule-decorator-3.37.3.tgz"},"main":"dist/index.js","engines":{"node":">=14.0.0"},"gitHead":"5ad6b48d45cebbdac751f2c70bcb398f9a468961","scripts":{"tsc":"npm run clean && tsc -p ./tsconfig.json","clean":"tsc -b --clean","tsc:pub":"npm run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"npm run tsc:pub"},"typings":"dist/index.d.ts","_npmUser":{"name":"killagu","email":"killa07071201@gmail.com"},"repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/schedule-decorator"},"_npmVersion":"lerna/6.6.2/node@v18.19.1+x64 (darwin)","description":"tegg schedule decorator","directories":{},"_nodeVersion":"18.19.1","dependencies":{"cron-parser":"^2.18.0","@eggjs/tegg-types":"^3.37.3","@eggjs/tegg-metadata":"^3.37.3","@eggjs/core-decorator":"^3.37.3","@eggjs/tegg-common-util":"^3.37.3"},"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.37.3_1713348019732_0.3113801233181779","host":"s3://npm-registry-packages"},"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":1713348019878,"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":1713348019878,"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"}}