I have a problem deploying my project with envoyer which executes an artisan-command I created.
The command gets all my users, performs another artisan command ($this->call('command')
) and performs it actions by iterating through all the users.
The problems lies here:
foreach($usernames as $username) {
shell_exec('php ' . base_path('artisan') . ' command ' . $username . ' > /dev/null 2>/dev/null &');
}
This command starts a script in the background. Its getting executed without any problems manually and doesn't end in a timeout (takes about 1s~ to execute) but in envoyer it wont stop running in the deploying step and fails in a timeout altough it executes flawless.
Additional informations:
For the reason why i'm running the script in the background:
The script im starting opens a socket which he will listen 24/7 until
the user cancel it manually.