nohup php file.php > /dev/null 2>&1 &
The greater-thans (>) in commands like these redirect the program’s output somewhere. In this case, something is being redirected to /dev/null, and something is being redirected to &1
Standard in, out, and error
There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.
Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.
the command above is redirecting the standard output to /dev/null, which is a place you can dump anything you don’t want, then redirecting standard error into standard output (you have to put an & in front of the destination when you do this).
The short explanation, therefore, is “all output from this command should be shoved into a black hole.” That’s one good way to make a program be really quiet!
& at the end puts the command in background.
ref: https://www.xaprb.com/blog/2006/06/06/what-does-devnull-21-mean/
jobsafterward, it lists the process but says that it has stopped.&flag, then it will continue running without a problem until I disconnect from the server, but I'd like to run it constantly in the background 24/7.