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
Percy2y ago
Project ID: N/A
malindu.dev
malindu.devOP2y ago
N/A
Brody
Brody2y ago
can you elaborate on what you mean by "timeout"
malindu.dev
malindu.devOP2y 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
Brody2y ago
will the api response itself take 1-2 minutes?
malindu.dev
malindu.devOP2y ago
Yes
Brody
Brody2y ago
what type of request? get? post? etc
malindu.dev
malindu.devOP2y 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
Brody2y 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
Brody2y ago
so a get request that takes 1-2 minutes would work on railway's side of things
malindu.dev
malindu.devOP2y ago
Superb, Thank you very much for your support!
Brody
Brody2y ago
no problem, glad i could help!
malindu.dev
malindu.devOP2y 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
luna2y ago
if you're using the lib above it doesn't matter. it'll take however long for the function to run.
Want results from more Discord servers?
Add your server