0

This question shows how to run a persistent PHP script. However, is there a way to also write the output to a text file? I've tried running nohup php hello_world.php & > &1 > output.txt, but I get syntax error near unexpected token '&'. If I remove the &, the output is logged, but the script only runs once. Thanks.

0

1 Answer 1

0

Try this:

nohup php hello_world.php > output.txt &
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.