I am running a script nohup php /var/www/html/foo.php
an immediately i hit enter,it gives me nohup: ignoring input and appending output to
nohup.out'`
My script is processing mysql records using pdo
$dbh = new PDO('mysql:host=localhost;dbname=odesk', 'root', '');
$sth = $dbh->prepare("SELECT id,msisdn from new_tableu limit 91471,10");
$sth->execute();
while($result = $sth->fetch(PDO::FETCH_ASSOC)){
}
Does this mean once i internet disconnects,my script too will stop?.
I could run my script in the background with nohup php /var/www/html/foo.php &
but its running forever which is not what i want.
It is save to run it as:
There will be no interruptions when you are disconnected.
My advice is to try screen, since this way you can disconnect then reconnect and check the script output
This way I was running bunch of scripts that take few weeks to finish and each day I checked the progress.