Skip to content

[SSF-133] set up MVP of cron job#97

Open
amywng wants to merge 3 commits intomainfrom
acw/SSF-133-donation-cron-job
Open

[SSF-133] set up MVP of cron job#97
amywng wants to merge 3 commits intomainfrom
acw/SSF-133-donation-cron-job

Conversation

@amywng
Copy link
Member

@amywng amywng commented Feb 3, 2026

ℹ️ Issue

Closes #133

📝 Description

  • Added donations.scheduler.ts with cron job that runs every day at 9 AM
  • The cron job currently just logs in the backend and calls the donation service to log in the console

✔️ Verification

I verified that the cron job was running by setting the cron pattern to be every minute @Cron('* * * * *') and running the backend to see the logs. You could alternatively do every second to verify this quicker (@Cron('* * * * * *'))

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@amywng amywng requested a review from dburkhart07 February 6, 2026 15:25
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to put a comment in from yesterday!

// fields in order: second, minute, hour, day of month, month, day of week
@Cron('0 30 10 * * *') // Runs every day at 10:30 AM
async handleDailyRecurringDonations() {
this.logger.log('Running daily donation reminder cron job');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the user of a logger. Any reason why we are doing this now over console logging like we had done previously?

@amywng amywng requested a review from dburkhart07 February 6, 2026 20:02
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with a note to @Yurika-Kan and @sam-schu

Perhaps worth to make a little one point ticket to change our console logs and errors that we have (while not a ton) to be loggers instead, and start using this from here on out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants