Error in custom start command please i need help
pureenergyaccount
PROOP

2 years ago

Here's the translation:

---

I have a problem with a custom start command. I set the command php artisan schedule:run to execute my scheduled tasks, and everything runs fine. However, after that, it crashes the server. The command I execute is just a simple message for testing, and if I run it from Nixpack for testing, everything works fine. The issue only occurs when configuring the custom start command.

Solved

12 Replies

brody
EMPLOYEE

2 years ago

Please provide any errors you are getting.


pureenergyaccount
PROOP

2 years ago

That’s the problem; there are no error logs, and nothing indicates what went wrong. Simply by configuring it, after the command runs, the server becomes unusable.


brody
EMPLOYEE

2 years ago

Because that command does not start a server, you need two services, one to run the server and one to run the schedule.


pureenergyaccount
PROOP

2 years ago

I previously scheduled a cron job with that command. The cron job was running that command every 24 hours, and everything was working. But now I'm encountering that error. Any ideas on how to implement what I need?


brody
EMPLOYEE

2 years ago

You need two Railway services, one to run the server and one to run the schedule.


pureenergyaccount
PROOP

2 years ago

So, does this mean I should create exactly another project with the same program, connected to the same database, but with this one only running the tasks with php artisan schedule:run?


brody
EMPLOYEE

2 years ago

Not another project, another service in the same project.


pureenergyaccount
PROOP

2 years ago

Would you be so kind to guide me a bit? It’s the last thing I need to do, and I haven’t been able to accomplish it. I would greatly appreciate it.


brody
EMPLOYEE

2 years ago

Make sure you have your service set up to be a web server again, right click on your service, click duplicate, then change the start command.


pureenergyaccount
PROOP

2 years ago

Correct, then perform the deploy. What should I do next?


pureenergyaccount
PROOP

2 years ago

Thank you very much. I have now observed the functionality. From that service, it only runs the command and configures the cron. My time-related issue has been resolved. Thank you so much.


brody
EMPLOYEE

2 years ago

No problem!


Status changed to Solved brody over 1 year ago


Loading...