redwoodjs / redwoodjs.com

redwoodjs.com redesign for 1.0
21 stars 23 forks source link

Notify a job post owner that their post is about to become inactive after X days #72

Open cannikin opened 2 years ago

cannikin commented 2 years ago

Right now a job post would be live on the site forever. This feature would automatically make it inactive after 30 days. The owner can come to the site, or click a link in the email, to extend the "active" time another 30 days.

aggmoulik commented 2 years ago

@cannikin I can work on this. Do you have any point to add as what we should here for notification.

cannikin commented 2 years ago

Thanks! We've got an email lib in there already, and it's sending notices when you create a job or job profile. You'll see there's an email service that sends them. We'd probably want a job that runs every 24 hours to check if any jobs are going to expire in the next 3 days or something and send out a notification. Netlify has some kind of scheduled job runner now, I figured we'd use that.

There's no concept of expiration n the database currently, so I'd probably add an expiresAt column and set it to 30 days in the future when the job is created. If you follow a link in the email to make the job live for another 30 days, it just resets that expiresAt value to another 30 days in the future.