{"name":"@eggjs/tegg-schedule-decorator","version":"3.0.0","keywords":["egg","typescript","runtime","tegg"],"author":{"name":"killagu","email":"killa123@126.com"},"license":"MIT","_id":"@eggjs/tegg-schedule-decorator@3.0.0","homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"35faa08e8f965cb57dd0f4f65115efc2fd2468e6","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-schedule-decorator/download/@eggjs/tegg-schedule-decorator-3.0.0.tgz","fileCount":15,"integrity":"sha512-4nihJ00J6KK4KIVWevRBmE9Q4xQorj2gwP3cz/AiwNKKHgDn7o/RhnxFLiErySgKC4ckmL00udnuLCMd7RkLWQ==","signatures":[{"sig":"MEUCIEGEt7Lgh/Pr1uf8b1MB6aSDeuNUV//IHBkOYURp6m+qAiEA5SBqAjA/aHFMiD+QKJac0bl504JuK300BWi9dpV50qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjqSfKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfQRAAiKpGszWCRDoYMsUyJbXlkNN4uPAl6LgvDCB6HUoHXd86qput\r\nngzi5/+ijOKx/pjSTrRJzHUtmh787jdAdK266L/K4Z+Eyhkq2Vd2mCrwUAel\r\nmgxxkNA06VzBJCIIf96gRS1N4X5FXSt87NpMdoxmMv4xSgIN5s5Liyvs1N9a\r\ndRDtelYtxXZfMHe33a72npo8ohP2X3XJVxxXMoGv8g1XIrfcEG/GsY2A8nJF\r\nRD881sL6A+pVG1lVxXVqt1nmjQhDAsWqFCLjHxPT+fqd2nCfgTFyGlYpuZA7\r\ndqRmR1VFiG9f2P/089nMXs3dOqr5Hb9b6g7ki+7oVb+uGzSRjFAp/eeNW6Xh\r\nb1/YMqqxBaVE4JtOsm+8IIPN90CrC0s3hUaKxrqAXcV2ZiNAUQnIKlm3R8Bi\r\nP5oAmfy7E7UiDaDkoD8gPapS1kuE7QikClR6xcDJ5rC0xdUMvrJj1ScLSeBT\r\nnozpYvY3QrCQ0/AUl+eplxUHz9qOvTw3yg4K58j989qyBAabmd/nuZnkLQpH\r\noj/eG4+DUyGB3CUsnOPbPHbgPp8Sm4v7tr+bPUGLoXa9ejcINIEIste8rhxp\r\nSGs1VFSHP9Z2wOSSUBsGpvlOtlAjlOJ/ftoe2xlfPiwzskDRmgUIDayLjZ0G\r\nh+P8Yl04tewnUb1ivZ+kYe637bl7rdMsx6Y=\r\n=6asU\r\n-----END PGP SIGNATURE-----\r\n","size":5790,"noattachment":false,"key":"/@eggjs/tegg-schedule-decorator/-/@eggjs/tegg-schedule-decorator-3.0.0.tgz"},"main":"dist/index.js","engines":{"node":">=14.0.0"},"gitHead":"942c516999e5380bd3f2b30de1dfd28569525da4","scripts":{"tsc":"npm run clean && tsc -p ./tsconfig.json","autod":"autod","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.1.0/node@v16.18.1+x64 (darwin)","description":"tegg schedule decorator","directories":{},"_nodeVersion":"16.18.1","dependencies":{"cron-parser":"^2.18.0","@eggjs/tegg-metadata":"^3.0.0","@eggjs/core-decorator":"^3.0.0","@eggjs/tegg-common-util":"^1.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"egg-schedule":"^3.6.6"},"_npmOperationalInternal":{"tmp":"tmp/tegg-schedule-decorator_3.0.0_1672030154174_0.6492758477243572","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":1672030154366,"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":1672030154366,"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"}}