Python Cron App (clock process) Procfile help
Does clock process exist in Railway? Like on Heroku: https://devcenter.heroku.com/articles/scheduled-jobs-custom-clock-processes#defining-custom-clock-processes
Does it make sence to create Procfile like this
python app is using schedule (https://github.com/dbader/schedule) module
14 Replies
Project ID:
N/A
N/A
Not right now, but you can emulate that by having a process for triggering whatever job you want on a schedule. The concept is the same
Okay, but I deployed with this Procfile and everything work. I guess "clock:" just does nothing in my case? Will be the same if you write web: python main.py
And how actually "python main.py" works if it's Poetry project or does it run it in the poetry shell?
And what does it mean in Procfile web:, clock:, etc., I just can see that my app is called "clock" in railway.
And in general, does it make sense to write something in the Procfile if I have a poetry application that is using "schedule" module in main.py in root?
I'm new to deployments so sorry if these will seem like odd questions.
Here: https://docs.railway.app/deploy/builds#procfiles I found info about "web:", but it's not web in my case and I can't find info about other options
web and release are the only real supported procfile directives
So what would be correct to specify in my case?
.
you would need to do an in code cron scheduler
Yep I did it using schedule module
But what to specify in Procfile then?
send your current procfile
In terms of code I use poetry, and I have main.py in the project root that run something like this:
then just do
is it valid syntax? looks strange
oh sorry
thanks