Running Script Manually 0:00When you are in a situation where you need to have one application running in the background all the time, Laravel Forge provides you with daemons. Daemons allow you to specify a command, and Laravel Forge will configure a service called Supervisor to make sure that this command always runs in the background. For a demonstration purpose, I created a simple ReactPHP application taken straight from the example website. And in this case, it is a PHP application that creates a web server on port 8080, and it always returns Hello World. So I created this file locally and called it ReactPHP file. Now, if I want to call this command manually, what I could do is I could just SSH onto my server, go into the folder, so it's in my default site, and then just call the script. The script. And now if I go to my application on port 8080, Configuring a Daemon 1:02go into the folder, so it's in my default site, and then just call the script. The script. And now if I go to my application on port 8080, I will see Hello World. Now, the problem is if I close the application or quit my terminal, the command is no longer running and I cannot access the server. So in order to fix this, let's configure a daemon on Laravel Forge that takes care of running this command. So the command in our case would be phpreact.php. We want to call it as a user called forge, and the directory that we're working with is slash home forge default. You could also remove the directory and add it to the command so that you have an absolute command that you want to call. But to make it a bit easier and more readable, I will just move this to the directory part. Okay, let's start the daemon. Managing Daemon Status 2:08command that you want to call. But to make it a bit easier and more readable, I will just move this to the directory part. Okay, let's start the daemon. So if I now go back to my tab and reload, I can now see that Forge has created a daemon for me that takes care of running this PHP script. So here you can define all your daemons, and once you have them activated, you can see the status. So this will show you the uptime of the process and if it's currently running or not. And you can also restart the daemons or remove them entirely. So whenever you want to run a specific command or task in the background for a long period of time, daemons can help you with it. So whenever you want to run a specific command or task in the background for a long period of time, daemons can help you with it.So whenever you want to run a specific command or task in the background for a long period of time, daemons can help you with it.