#How to build something triggerable by Railway cron

9 messages · Page 1 of 1 (latest)

vast garnet
#

Currently I use cron-job.org to target a specific endpoint on an Express server I run. My understanding of Railway cron is that it would startup the entire service and therefore not work in the way I'm accustomed to. I'm not sure how to build a railway service that would do the same thing (be triggered by cron and successfully run)

The endpoint just reads a 3rd party API and then puts stuff into a database. How could I convert this to work with Railway? I assume have a service that is just this code but how would I wrap it up such that it ran for Railway cron? (iife? or still express somehow?)

Thanks!

north wagonBOT
#

Project ID: ae96d841-f386-4064-9f46-9e5cfcee52ae

rigid canopyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vast garnet
#

ae96d841-f386-4064-9f46-9e5cfcee52ae

crisp root
#

railway's cron jobs just redeploy your service, so just have your service do its job upon start and then exit when done

next smelt
#

Not the move dude

#

Agree with Brody here, there are packages for any language to run a given function on a cron schedule

vast garnet
#

Thanks for the help. I played around and am using an IIFE that's successfully running on the cron.

rigid canopyBOT