Skip to content

Commit

Permalink
Commented out cron scheduling for cheaper cloud run
Browse files Browse the repository at this point in the history
(and since feature is not really used as there are no users)
  • Loading branch information
FrancescoCoding authored May 26, 2024
1 parent 93094b0 commit 7bd7ea4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ app.use("/raffles", raffleRoutes);
// next();
// });

// Schedule automated raffle draws every minute
cron.schedule("0 0 * * *", () => {
console.log("Initiating automated draw for eligible raffles...");
automatedDrawForEligibleRaffles()
.then(() => console.log("Automated draw completed."))
.catch((err) => console.error("Error during automated draw:", err));
});
// Schedule automated raffle draws every day at midnight
// cron.schedule("0 0 * * *", () => {
// console.log("Initiating automated draw for eligible raffles...");
// automatedDrawForEligibleRaffles()
// .then(() => console.log("Automated draw completed."))
// .catch((err) => console.error("Error during automated draw:", err));
// });

/* Root path */
app.get("/", (req: Request, res: Response) => {
Expand Down

0 comments on commit 7bd7ea4

Please sign in to comment.