A
Anonymous
Guest
The below script on a server with PHP-FPM and PHP 8 runs twice. Second time exactly after 1 minute. Stack with Nginx in front and Apache in the back. Already set timeout exec and input to 1 hour.
*******************************
<?php
/*
* The purpose of this script is to see if cron jobs running more than 1 minute
* recall themselves
You can add a message by using ¬e=ThisUsingCronMessage
call like: https://wdleadscalls.org/cronjobs/testmulticall2.php?note=MyNoteForYou
*/
//Did they add a note
if (isset($_GET['note'])){
$note = $_GET['note'];
}else{
$note = "";
}
$Now = date('Y-m-d H:i:s');
echo "<h2> Starting This At $Now (Note:$note)</h2>";
$fp = fopen('LOGtestmultical2.txt', 'a');//opens file in append mode.
$Now = date('Y-m-d H:i:s');
$Msg = "\n Program Launched At: $Now";
fwrite($fp, $Msg);
fclose($fp);
$StartNow = $Now;
//Sleep for 4 minutes
sleep(241);
$fp = fopen('LOGtestmultical2.txt', 'a');//opens file in append mode.
$Now = date('Y-m-d H:i:s');
$Msg = "\n Program Finished At: $Now Started At$StartNow) (Note:$note)";
fwrite($fp, $Msg);
fclose($fp);
$Now = date('Y-m-d H:i:s');
echo "<h2> FINISHING This At $Now Started At$StartNow) (Note:$note)</h2>";
Any idea why? Where should I look?
*******************************
<?php
/*
* The purpose of this script is to see if cron jobs running more than 1 minute
* recall themselves
You can add a message by using ¬e=ThisUsingCronMessage
call like: https://wdleadscalls.org/cronjobs/testmulticall2.php?note=MyNoteForYou
*/
//Did they add a note
if (isset($_GET['note'])){
$note = $_GET['note'];
}else{
$note = "";
}
$Now = date('Y-m-d H:i:s');
echo "<h2> Starting This At $Now (Note:$note)</h2>";
$fp = fopen('LOGtestmultical2.txt', 'a');//opens file in append mode.
$Now = date('Y-m-d H:i:s');
$Msg = "\n Program Launched At: $Now";
fwrite($fp, $Msg);
fclose($fp);
$StartNow = $Now;
//Sleep for 4 minutes
sleep(241);
$fp = fopen('LOGtestmultical2.txt', 'a');//opens file in append mode.
$Now = date('Y-m-d H:i:s');
$Msg = "\n Program Finished At: $Now Started At$StartNow) (Note:$note)";
fwrite($fp, $Msg);
fclose($fp);
$Now = date('Y-m-d H:i:s');
echo "<h2> FINISHING This At $Now Started At$StartNow) (Note:$note)</h2>";
Any idea why? Where should I look?