I have set up a site where people can submit items to a database and I want to allow users to schedule items to be posted in the future. An easy way to do it would be to just set up a date picker and then filter the site to only show posts that have “releaseDate” set to a time after the current time. However, I also want to communicate with social media APIs whenever a post is ready to be shown on the site.
In short terms: I need a way to execute a function when the “releaseDate” field of a database item passes the current time/date. Is this possible? Where should I look for answers?
Can this be done with database hooks? (probably not, since the way I understand them is that database hooks only execute when something happens with the database and I want a function to execute at a custom time when nothing is necessarily being inserted deleted or updated). But I assume it would have to be written on the backend somehow.
I have been looking for more information on how to do this for two days without much luck. Does anyone have any pointers?