kokkoro-plugin-kfc 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,11 +16,11 @@ npm i kokkoro-plugin-kfc
|
|
|
16
16
|
|
|
17
17
|
## 环境变量
|
|
18
18
|
|
|
19
|
-
你可以在项目根目录下创建 `.env` 文件,修改 `KFC_DATE` 变量来自定义自动发送的时间,默认 `0 0 12
|
|
19
|
+
你可以在项目根目录下创建 `.env` 文件,修改 `KFC_DATE` 变量来自定义自动发送的时间,默认 `0 0 12 * * 4`(每周四中午十二点)
|
|
20
20
|
|
|
21
21
|
```ini
|
|
22
22
|
# KFC 时间
|
|
23
|
-
KFC_DATE=0 0 12
|
|
23
|
+
KFC_DATE=0 0 12 * * 4
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
因为插件的定时任务是在初始化时创建的,所以如果你修改了 `KFC_DATE` 变量,需要使用 `reload` 指令将其重新挂载才能生效。
|
package/lib/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const plugin = new core_1.Plugin('kfc', option);
|
|
|
12
12
|
const service = new service_1.Service(plugin);
|
|
13
13
|
plugin
|
|
14
14
|
.version(pkg.version)
|
|
15
|
-
.schedule(process.env.KFC_DATE ?? '0 0 12
|
|
15
|
+
.schedule(process.env.KFC_DATE ?? '0 0 12 * * 4', async () => {
|
|
16
16
|
await service.autoSend();
|
|
17
17
|
});
|
|
18
18
|
plugin
|