|
|
|
|
|
by mani-smhack
3135 days ago
|
|
Yeah this works for cron jobs .
Let me explain my requirement ,
say i have social media platform and users will schedule their post , and i need to schedule it in my scheduler and i have to persist in the databsae too . Because if the server is restarted all my scheduled jobs will be gone .. So i am looking for a hosted scheduler where i can send a rest API request with a webhook and a small payload . During the execution time the hosted scheduler will call the webhook with the payload , so that i will publish the post . Pros is that i dont want to worry about the scheduled jobs .Right now i am unable to find a scheduler with the good admin UI ( to pause all the jobs ) to delete the trial users post . |
|
Save the future posts to the database with the required publish date/time.
Run cron every $X minutes where $X is the smallest interval you allow (ie if you force publish date to be rounded to 5 minutes, run cron every 5 minutes) and check for "future posts" where the publish date <= now(), and take action.
This is pretty basic stuff and that you want to offload it to a 3rd party by capturing all the details into a request to be made back to your app is a huge red flag IMO.