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:
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...
Jump to solution
14 Replies
Percy
Percy13mo ago
Project ID: N/A
malindu.dev
malindu.dev13mo ago
N/A
Brody
Brody13mo ago
can you elaborate on what you mean by "timeout"
malindu.dev
malindu.dev13mo ago
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.
Brody
Brody13mo ago
will the api response itself take 1-2 minutes?
malindu.dev
malindu.dev13mo ago
Yes
Brody
Brody13mo ago
what type of request? get? post? etc
malindu.dev
malindu.dev13mo ago
I am running some set of APIs with pagination. So that process takes bit longer time to complete. Those are GET requests
Solution
Brody
Brody13mo ago
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
Brody
Brody13mo ago
so a get request that takes 1-2 minutes would work on railway's side of things
malindu.dev
malindu.dev13mo ago
Superb, Thank you very much for your support!
Brody
Brody13mo ago
no problem, glad i could help!
malindu.dev
malindu.dev13mo ago
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?
luna
luna13mo ago
if you're using the lib above it doesn't matter. it'll take however long for the function to run.