How to avoid timeout when running time consuming jobs in Laravel

In my laravel application i do a form submit to execute a time consuming task by calling shell_exec(my_time_conusming_Script.sh) . The process executes successfully on the background. But the connection with the frontent is found to be lost. I find that the form submitting the data stops after processing for sometime. I had a return redirect()->back()->with('success',$message); after the shell_exec. But the redirect is not found to be working. if i comment out the time consuming process the redirect works. is any timeout happening. How should i get the redirect working after the time consuming process completes.Should i use laravel queues and jobs and broadcasting.