17
I started this process (time.php)
<?php
ignore_user_abort(true); // run script in background
set_time_limit(0); // run script forever
$interval = 300; // do every 1 minute...
do
{
// add the script that has to be ran every 1 minute here
// ...
$to = "xxxxxxxxx@gmail.com";
$subject = "Hello Richie";
$header = "From: me@xxxxxxxxx.org";
$body = "Hello Richard,\n\n"
. "I was just testing this service\n\n "
. "Thanks! ";
mail($to, $subject, $body, $header);
sleep($interval); // wait 5 minutes
} while(true);
?>
but I now want to stop it. It's sending hundreds of mail to my Gmail a/c. It's on a web server where I cant restart it to kill the process.
Is there a way to execute another file to kill the process, or how do I go about?