Schedulet doesn’t run php script

I don’t understand when I run the script through the browser, everything works! And when through Schedulet (win) as through cmd! That he does not process! here is the script itself:

$scandir=”D:/DATA/”;

$searchdir=”D:/www/iias_error/oborot/”;
set_time_limit(999999999);

$der=date(“d”);

           [email protected]("".$scandir."".$der."/");
                            for($a=2;$a<=count($dir);$a++)
                            {
                              $kick=substr($dir[$a],0,1);
if ($kick == "B")
                                {
                            exec('D:\www\iias_error\arj\arj.exe e '.$scandir.''.$der.'/'.$dir[$a].'');
                                [email protected]("".$searchdir."");                for($r=3,$g=1;$r<=count($dur);$r++,$g++){

$name=substr($dur[$r],”1″,”5″);

                                                 $mfo=substr($dur[$r],6,9);
                                  $body=str_replace(".","",$mfo);
                                  $dirk=$dir[$a];
                                  $dirk=substr($dirk,0,1);
                                                                                            if($name != NULL && $body != NULL){
                                  $up_date=date('d-m-Y');
                                 $file = "D:/WWW/iias_error/error/err".$up_date.".txt";
                                 $current = "\n ".$name." * ".$body."";
                                                                     file_put_contents($file, $current,FILE_APPEND);
                                   }
                                 @unlink("".$dur[$r]."");
             }
      }
                                   }

Answer 1, authority 100%

Off-topic, etc. but try nncron. Cron for Windows. Personally, I once put my bots there and for two years I no longer remember about them.

Leave a reply

Please enter your comment!
Please enter your name here