From 991d88709ae07f7ae0747595ff5bae8cf2d552a7 Mon Sep 17 00:00:00 2001 From: gujiangjiang Date: Fri, 17 Oct 2025 23:44:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E9=82=AE=E4=BB=B6=E6=9C=89?= =?UTF-8?q?=E6=95=88=E6=9C=9F=E4=BB=8E1=E5=B0=8F=E6=97=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA1=E5=A4=A9=EF=BC=8C=E4=B8=8E=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=98=BE=E7=A4=BA=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/src/index.ts b/worker/src/index.ts index fcd89ba..c4de348 100644 --- a/worker/src/index.ts +++ b/worker/src/index.ts @@ -245,8 +245,8 @@ export default { // 定时任务 (清理过期邮件) async scheduled(event, env, ctx) { const db = getD1DB(env.DB); - // 清理一小时前的邮件 - const oneHourAgo = new Date(Date.now() - 1000 * 60 * 60); - await deleteExpiredEmails(db, oneHourAgo); + // 修复:将清理时间从1小时修改为24小时(1天) + const oneDayAgo = new Date(Date.now() - 1000 * 60 * 60 * 24); + await deleteExpiredEmails(db, oneDayAgo); }, };