R
Railway•8mo ago
Girish

Unable to execute cron commands

Guys , I have a django app deployed in railway. I want to schedule a cron job that runs a certain command on my projects directory . I created a service and scheduled the cron job but the service is not running and I am not sure how I can point the command to run at my projects' directory in railway. Can anyone help
54 Replies
Percy
Percy•8mo ago
Project ID: N/A
Brody
Brody•8mo ago
what command do you want to run?
Girish
Girish•8mo ago
python manage.py send_maturity_emails
Brody
Brody•8mo ago
can you show me a screenshot of your railway project
Girish
Girish•8mo ago
No description
Girish
Girish•8mo ago
is this what you meant by project ?
Brody
Brody•8mo ago
yep exactly when you run python manage.py send_maturity_emails does that code do its task and then exit?
Girish
Girish•8mo ago
yes it doesnt have any rogue instances / components. Its just a python command that executes a .py file In my local. i am able to navigate to my porject directory and run this command and an email is sent
Brody
Brody•8mo ago
but it exits after the task is done, correct?
Girish
Girish•8mo ago
is there an explicit way i can check that
Brody
Brody•8mo ago
oh you didnt write the code?
Girish
Girish•8mo ago
Yes brody I did. So to give you better context, this is a .py file that has a method which sends out emails to users. Thats it. So yes, the code exits It just calls a function
Brody
Brody•8mo ago
run that command locally, after it sends the email does it stay running or does it return you to the terminal?
Girish
Girish•8mo ago
one sec It returns
Girish
Girish•8mo ago
No description
Want results from more Discord servers?
Add your server