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
Project ID:
N/A
what command do you want to run?
python manage.py send_maturity_emails
can you show me a screenshot of your railway project
![No description](https://cdn.answeroverflow.com/1196136037764825098/image.png)
is this what you meant by project ?
yep exactly
when you run
python manage.py send_maturity_emails
does that code do its task and then exit?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
but it exits after the task is done, correct?
is there an explicit way i can check that
oh you didnt write the code?
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
run that command locally, after it sends the email does it stay running or does it return you to the terminal?
one sec
It returns
![No description](https://cdn.answeroverflow.com/1196137393095459019/image.png)