List all php cli scripts running in the background

118 Views Asked by At

I am running some background tasks with php cli using nohup php app.php &.How can i list all the scripts that i have sent to the background and how can i forcibly close it?.

My script looks like

$dbh = new PDO('mysql:host=localhost;dbname=odesk', 'root', '');
$sth = $dbh->prepare("SELECT id,msisdn from new_r4 limit 44908,50000");
$sth->execute();

while($result = $sth->fetch(PDO::FETCH_ASSOC)){

Will this script i sent to the background stop once i have processed all rows?.

0

There are 0 best solutions below