cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New

Cron Job Not Executing

I am trying to set a Cron job to execute a PHP script I have on my server. I've tried to set it up many different ways, but it never executes. I've also accounted for the server time being different from mine. Am I missing something? Or does something need to be changed?

 

This is the command as it is generated by the Cron job manager.

/web/cgi-bin/php5 "$HOME/html/finder/searcher/php/pullList.php"
2 REPLIES 2
New

Re: Cron Job Not Executing

Can somebody answer this? I'm having the same problem,

Re: Cron Job Not Executing

I'm having a similar problem. That is, accessing the php code via a web browser works OK but when the cron job runs, set for midnight, it executes some echo statements but not the delete/remove/unlink command. I have other php files that generate temporary .jpeg and .html files which I want to delete/remove/unlink each day.

The code

<?php
echo "Start<br>";

echo "<br>Delete jpeg files<br>";
foreach (glob("aaf*.jpeg") as $filename)
{
   echo "$filename size " . filesize($filename) . "<br>";
   unlink($filename);
}

echo "<br>Delete html files<br>";
foreach (glob("aaf*.html") as $filename)
{
   echo "$filename size " . filesize($filename) . "<br>";
   unlink($filename);
}

echo "<br>Stop<br>";
?>

Any suggestions?