#Need help with building a Scheduler app

10 messages · Page 1 of 1 (latest)

obtuse sundial
#

I need some advice on how can we do this, I am building a social media schedule app where users can select their timezone, date range and at what time to post on social media.

For example - If I chose to run the scheduler for 3 days ie (7-10) at the same time 5 pm then for these days on 5pm the post will be published

Could anyone give me an overview of how can we build this?
Thanks

tropic ingot
#

this way you also don't have to deal with the time zone the server is running in

#

on the frontend you convert everything back to the time the user has

obtuse sundial
#

So should run a scheduled function or cron job ?

#

Can someone from the convex team help with this if possible 🤗

lilac juniper
#

If you're letting the user choose a time down to the minute, you could have a cron job run every minute, query all scheduled posts for that minute and send away.

tropic ingot
#

If you have only a few users and run a query every minute it needs more resources than just saving everything in a scheduled function

lilac juniper
#

Not necessarily, cron will use ~4% of function call monthly quota on the starter plan, and any "wasted" calls that don't result in a published post will be a ~1ms query that returns empty.