3 days ago
I want to use a Cron job to create a balance snapshot on Postgresql. I have created python script to invoke the procedures on the database so as to perform this snapshot. I have been looking for a way to schedule it, but I cannot find a place to define the job I want to run. on the +Cron Schedule I am only seeing where to do the schedule timings but not define the job I want to run. What could be the problem?
3 Replies
3 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 3 days ago
3 days ago
Railway’s Cron Scheduler works a bit differently than a traditional system cron. It’s designed to trigger HTTP endpoints or Railway services not directly run scripts or shell commands.
That’s likely why you’re not seeing a place to define the job logic itself. Railway expects the logic to live inside a deployed service or exposed HTTP route. I think you should either convert your Python script into a Railway service, or use a command-based worker service instead.
Could you let me know:
Whether your Python script is already part of a deployed Railway project?
If not, would you prefer to expose it via an HTTP endpoint or just have it run as a background worker?
idiegea21
Railway’s Cron Scheduler works a bit differently than a traditional system cron. It’s designed to trigger HTTP endpoints or Railway services not directly run scripts or shell commands.That’s likely why you’re not seeing a place to define the job logic itself. Railway expects the logic to live inside a deployed service or exposed HTTP route. I think you should either convert your Python script into a Railway service, or use a command-based worker service instead.Could you let me know:Whether your Python script is already part of a deployed Railway project?If not, would you prefer to expose it via an HTTP endpoint or just have it run as a background worker?
2 days ago
Yes, my Python script is part of my deployment. You could also share a link on how to implement the second option (that is, using HTTP).
dmwangike
Yes, my Python script is part of my deployment. You could also share a link on how to implement the second option (that is, using HTTP).
2 days ago
Thanks @idiegea21, I managed to research based on your directions and deployed a scheduled service
Status changed to Open sarahkb125 • 2 days ago
Status changed to Solved sarahkb125 • 2 days ago