Commit edfdd05f by lixinming

短信

parent 6165a062
......@@ -42,6 +42,17 @@ async function fuHuaQiTask() {
}
export function initSMSTask() {
smsTask();
setInterval(async function () {
await smsTask();
}, 3600 * 1000);
console.log(`systemTask init success`);
}
/**
* 短信任务 每月倒数第七天发送
*/
......
import { initSMS } from "./biz/sms";
import { initSystemTask, smsTask } from "./biz/systemTask";
import { initSystemTask, initSMSTask } from "./biz/systemTask";
import { initConfig, systemConfig} from "./config/serverConfig";
import { initDB } from "./db/mongo/dbInit";
import { httpServer } from "./net/http_server";
......@@ -15,8 +15,10 @@ async function lanuch() {
await initBasicData();
/**初始化系统任务 */
await initSystemTask();
/**腾讯云短信 */
/**初始化腾讯云短信配置 */
await initSMS();
/**初始化短信任务 */
await initSMSTask();
/**创建http服务 */
httpServer.createServer(systemConfig.port);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment