redwoodjs.com icon indicating copy to clipboard operation
redwoodjs.com copied to clipboard

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

Open cannikin opened this issue 2 years ago • 2 comments

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.

cannikin avatar May 03 '22 18:05 cannikin

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

aggmoulik avatar May 07 '22 19:05 aggmoulik

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.

cannikin avatar May 09 '22 02:05 cannikin