16 days ago
I have a script that executes a task and dies, but I want to other api trigger, how do I setup like a Cloud run job on GCP
1 Replies
16 days ago
The closest equivalent to a GCP Cloud Run Job on Railway is a cron job - you configure a cron schedule on your service, and Railway will start it on that schedule, expecting it to execute the task and exit with code 0. If you need on-demand triggering via API instead of a schedule, you can use our Public API to trigger a redeploy or restart programmatically (e.g., the deploymentRedeploy or environmentTriggersDeploy mutations), which will spin up your service, run the script, and it will stop once it exits cleanly.
Status changed to Awaiting User Response Railway • 16 days ago
9 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 9 days ago