a year ago
is duplicating a project (already on railway) purely to use scheduled deployment, to pretend-cron a script thats in the codebase, a terrible idea? in my head its the entire project sat there again for 1 script, seems wasteful
am just trying to get the fastest easiest way of having an action run on the codebase, but im currently serverless on railway, so kinda rules out node-cron
14 Replies
a year ago
23b6f92c-43e1-4e11-aad1-7d8f6ae0f126
a year ago
duplicate the service within the same project so its not as messy? and then as long as theres no need for a volume it should work relatively fine
a year ago
the more complicated way to do it that would work even with a volume would be to add code to trigger the script when a certain endpoint is hit and then use other services (or even railway with a simple curl service?) that allow hitting an endpoint on a cron schedule
a year ago
I actually think that's what I mean, duplicate service within the project.
It'd not need a volume, not need external web access, I have since noticed I can take the cores and stuff right down too
a year ago
I did consider some sort of external Cron too but it felt more effort. I think I'll go with the duplicate service for now and just keep an eye on usage!
a year ago
fun fact, you can duplicate the service via the service's right click context menu
a year ago
Didn't know that either i went the long way 🫡
a year ago
the context menu has some good stuff!
a year ago
just on this, if i want something that needs to run on like a minute schedule - say for checking for scheduled posts, and kicking them off, im guessing cron builds with the start command as a script at that interval might be silly, and i should look to some other external cron service, w/ a webhook or smth?
a year ago
daily felt fine but minute feels dirty
a year ago
or i could turn off serverless and use node-cron
a year ago
hello,
slight misunderstanding, we do not rebuild or redeploy on whatever the set schedule may be, we are simply starting the already built image again.
but even so, the minimum frequency you can run crons on is 5 minutes, so if you need anything with a higher frequency then you would need to move to an in-code scheduler like node-cron or equivalent.
a year ago
thank you\
a year ago
!s
Status changed to Solved brody • about 1 year ago