I am trying to invoke beanstalk workers on remote machines from a management server.
I have a function that takes a host name, SSHes on a private network to a target machine, and then runs commands on that computer.
The command I use to create jobs (when I do this manually at the prompt on the target server):
nohup /path/to/php /path/to/file/worker.php &
The way out of this:
nohup: ignoring input and appending output to `nohup.out'
To return to the invitation, ctrl + c is required
When I do this from a remote machine, a script runs and it shows the output "worker", which sits there and waits for work. I need ctrl + c to return to the tooltip.
When I run this command with php in the browser, it launches the working one, but the browser just freezes after that and eventually hits the nginx timeout. I assume this is because shell_exec (), which I use to run the command, is waiting for an invitation after running this command, but it requires ctrl + c, so it believes that the command has not finished executing.
How can I make him return to the invitation after running this command?
user15063
source
share