Railway cron jobs
I am going to create a cron job using Railway by following this blog post.
https://blog.railway.app/p/cron-jobs
I am just curious to know about the timeout duration for Railway cron jobs.
Railway Blog
Cron Jobs on Railway
A brief guide on deploying and running cron jobs on Railway using JavaScript.
Solution:Jump to solution
i have personally held a get request open to railway for up to ~30 minutes without issue.
however post requests do have a known time limit of 5 minutes...
14 Replies
Project ID:
N/A
N/A
can you elaborate on what you mean by "timeout"
The APIs I am going to integrate with Cron jobs are long-running processes, sometimes taking 1-2 minutes. I want to know if Railway Cron Jobs will be able to handle that much time, without getting time out.
will the api response itself take 1-2 minutes?
Yes
what type of request? get? post? etc
I am running some set of APIs with pagination. So that process takes bit longer time to complete.
Those are GET requests
Solution
i have personally held a get request open to railway for up to ~30 minutes without issue.
however post requests do have a known time limit of 5 minutes
so a get request that takes 1-2 minutes would work on railway's side of things
Superb, Thank you very much for your support!
no problem, glad i could help!
Hey @Brody , small question again regarding this question.
If I run a background task inside a cron job in Railway that doesn't involve HTTP requests but takes time to process, how long can it run?
if you're using the lib above it doesn't matter. it'll take however long for the function to run.