diff --git a/index.ts b/index.ts index a7e7ea3..246eea3 100644 --- a/index.ts +++ b/index.ts @@ -25,8 +25,11 @@ scheduleJob("*/15 * * * *", main); scheduleJob("0 10 * * 5", manageRobot.sendRobotMsg); Bun.serve({ - async fetch() { - await manageRobot.sendRobotMsg(); + async fetch(req) { + const url = new URL(req.url); + if (url.pathname === '/ci') { + await manageRobot.sendRobotMsg(); + } return new Response("OK"); }, port: 3000,