Skip to content

Commit 2deccc8

Browse files
committed
Add timezone update to scheduler
1 parent cbcc280 commit 2deccc8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/infrastructure/discord/scheduler.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ import { Client } from "discord.js";
33
import { urgentItemsDirectMessage } from "./tasks/urgentItemsDirectMessage";
44

55
export function schedule(client: Client) {
6-
cron.schedule("30 8 * * *", async () => {
7-
await urgentItemsDirectMessage(client);
8-
});
6+
// Run at 8:30 AM EST (Eastern Standard Time)
7+
cron.schedule(
8+
"30 8 * * *",
9+
async () => {
10+
await urgentItemsDirectMessage(client);
11+
},
12+
{
13+
timezone: "America/New_York",
14+
},
15+
);
916
}

0 commit comments

Comments
 (0)