Railway cron jobs

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