wierd problem with one cronjob (others ok)

Status
Not open for further replies.

AlexMcCann

Verified User
Joined
Jun 29, 2007
Messages
27
i have wierd problem with one cronjob - it is driving me craizy and i have absolutly no idea what is wrong

- it works when i call the command from putty, but it doesent when i enter it in cronjob

it is entered the following way (the same way as other cronjobs):
/usr/local/bin/php /home/admin/domains/xxx.com/public_html/x/x.php

when i run it in browser - it works, when i run it in putty (the way it is written above) - it works

- but as a cronjob it dosen't - no result at all???

this is a acript that is being run(shuffles the playlist):
<?php
$list = array();
$handle = fopen("/home/admin/domains/x.com/public_html/x/list/x.txt","r");
$i = 0;
while (!feof($handle))
{
$temp=fgets($handle);
$list[$i]=$temp;
$i++;
}
shuffle($list);
$z=0;
fclose($handle);
$handle=fopen("/home/admin/domains/x.com/public_html/x/list/x.m3u","w");
while ($z < $i)
{
$temp=$list[$z];
fputs($handle,$temp);
$z++;
}
fclose($handle);
?>

So please help me - what the hell is wrong?
 
Status
Not open for further replies.
Back
Top