I’m building a simple job board and would like jobs to be automatically removed from the site after a certain period of say 30 days. I don’t want to delete the jobs completely so my idea was just to have a field called “status” that would change from “live” to “expired” after 30 days, and my repeating group would only show “live” jobs.
The part I can’t work out is how to have the “status” being automatically modified to “expired” after 30 days. I feel like it needs to be a site-wide workflow rather than at page level? Does anybody have any ideas?
Seems like I will need to use a schedule API workflow but I’m pretty stumped by how to actually do it.
Would I add the action for updating the status in the API workflow menu? And I’m not sure where I should actually trigger this as it’s really a site-wide function and some jobs would be added directly to the backend in Bubble, rather than through a specific page on the site. So far, I’ve got this in the API but I’m not convinced I’ve got this right?
@mishav has the right idea on this. Don’t waste workflows on this. Just don’t display jobs that are 30 days older than their creation date.
That is, you can always algorithmically get “expiration date”, right?
Now, it might be wise (hard to say if there’d truly be any benefit to this) to set a date type field (“expiry date”) on the job thing when it’s created that is current date time:+days 30 so that you don’t have to compute that over and over in your search criteria.
But you need not schedule the thing for deletion or even create some automated workflow for that. Database getting full? Go in and do a bulk API workflow from the data tab to cull your old things. And you can do THAT at a time when you don’t have a bunch of users online.
Once you get a sense for the patterns, then you might set up some sort of auto delete plan. But this is one of those, cross that bridge when you get to it things, right?
Just build your thing and deal with the ops type stuff as you have the time and necessity. I can see a lot of good reasons to keep your historical data around for longer than 30 days and it’s not like job descriptions take much space. It’s just a bunch of ASCII.