I have a Ubuntu Linux ec2 instance that's running on AWS. I used the following command
nohup php script.php
so that when I disconnect from the instance with SSH, it still runs. The script contains a huge loop and will take about 4 days to complete.
for($i=0;$i<1000000;$i++) {
// It does other stuff that's kind of irrelevant
echo $i.'\n';
}
I was checking the nohup.out
file with the vim editor
to see if it was still being appended every couple of hours. It seems to have stopped being appended. But, entering ps -ef
in the terminal, shows the script as still running.
Any ideas?