Ubuntu Screen command does not recognize Lumen Queue command

210 Views Asked by At

I am in a bit of a situation where I need to manually restart queues on linux/ubuntu based box and the proper approach I was told to follow is to use the screen command line application.

I am on Ubuntu 14.X and when I do an -ls command I can actually see the sessions running on the server. Below is a command I would run if I was outside screen session:

mycommandline$ php artisan queue:restart

Now the issue is that if from the -ls output I grab the session's port to include in the command I run I get the error below:

Cannot exec 'php artisan queue': No such file or directory

I also tried typing screen "php artisan queue:restart" and I keep getting the same issue.

I am not farmiliar at all with the screen program and any suggestions to point me to the right direction would be much appreciated.

1

There are 1 best solutions below

0
On

Okay digging through google I came up with the command below. Given that I already had a session that was running I needed to make sure that I send my commands on that same session just to be sure. Below is what I ended up doing which does confirm that something is happenning within the screen session:

luyanda@devbox:~$ screen -d -r 19167 -p0 -x stuff "free -g; php artisan queue:restart"
Attaching from inside of screen?

As I am not seeing any visible issues I am convinced that this is what I needed to do given that my log file is updating as well it either means that the queues never stopped working or I managed to restart them.

What I am still interested to know is how I can actually see the output of the commands I send to my session else if I can rather pipe the output somewhere else.

Any thoughts?