#Python Telegram Bot Scheduled Deployment

7 messages · Page 1 of 1 (latest)

ashen ginkgo
#

I managed to successfully deploy my telegram bot on railway. The bot basically scrapes a website and output the results on telegram. Currently, the script only run once when I click the deploy button. I was wondering if there is a way to schedule the deployment (i.e deploy every hour automatically)? I came across this article (https://blog.railway.app/p/cron-jobs) but I am not very sure how to modify it for my python app.

Railway Blog

A brief guide on deploying and running cron jobs on Railway using JavaScript.

keen oreBOT
#

Project ID: N/A

#

You can use the node-cron library to deploy a simple cron service on Railway. This should be possible with all the languages we support, including Python. You can follow the instructions in the article to modify it for your Python app.

ashen ginkgo
midnight palm
#

Instead of launching your app directly, launch a separate file that will call your main.py on an interval

ashen ginkgo