How can I periodically run a management command on railway?
I need to cd into the project's folder, and then run , but i can't seem to figure out how to do this (the only option that there seems to be is running a start command on a cron schedule)
Thanks!
11 Replies
Project ID:
6ec4e69f-153c-42b1-8399-d4fbd6db04fb
probably irrelevant but 6ec4e69f-153c-42b1-8399-d4fbd6db04fb
create a new service in the project, add the needed service variables, set that as the start command, set the cron schedule, and then add your repo
are all my services run inside something like one VM, and as such i can set the start command to something like ?
or maybe is there a way for me to view the file structure of the vm through a service?
nope, if you want the command to be run in the tkdmanager sub directory set the root directory of tbr service to
/tkdmanager
and that will be the same /tkdmanager as the django service?
the same code yes, the same disk, no
ARGHHHH
okay
so i have my django service that needs a command run based on a cron schedule
i make a new blank service
this service has its root directory set to /tkdmanager
set the start command of the new service to be
and then set that to run on the cron schedule
?
sounds correct
okay will try that
doesn't seem to do anything
i added a print to the start of the command and that isn't firing either
you'd have some other config / code issues then