Scheduled code execution

If you need a piece of code to run at exactly x date at y time, but also another piece of code (like a reminder) some 10 or whatever minutes before that date...how would you accomplish that? Cron jobs? on your API code or a separate Cron service? Any other methods you would use? All ideas welcomed
3 Replies
Electronic
Electronic2y ago
I think there's a node scheduler
Jochem
Jochem2y ago
I'd definitely use cron, especially if you've already got a server up and running anyway. as for whether it's part of your API or separate code, that really depends on what code it is. If it's something that has to run every day, but can also be manually started, then run it through your API. If it never needs running manually by an end user, then use isolated code that isn't accessible through your API
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server