I've got to run, so I don't have time to reply to this. I am instead posting it to the list so that others may help you. In the future, keep your posts on the list so that others can benefit or help you. :-)


CurlyBraces Technologies ( Pvt ) Ltd wrote:
yes, i did as u said ..............,
i have added that file into the /etc/cron.d , directory also

vi /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
 * * * * * root run-parts /etc/cron.d/abc.php

am i correct , plz help me ..........but it is still not running ?

thank u


----- Original Message ----- From: "Ben Ramsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 05, 2004 10:07 PM
Subject: [PHP] Re: shedule a php script




If you're on a Unix-like system, add the following at the top of your
script:

#!/usr/local/bin/php

Of course, modify the path to the location of your php binary, since it
may not be in the same location.  Then, make the file executable with:

chmod +x filename.php

Then, create a cron job to run the script however often you want.



Curlybraces Technologies Ltd wrote:

hi friends ,

when running this php script we can make a log file with relavent to the
mysql data base. but i need to execute this script after every 2 min
time. that is mean there must be a 2 min sleep time . can somebody help
me do this function plz .........?



<?php

require ('connectMySql.php');

$select= " select   ServiceNo, ServiceName,  Status, DateTime from
ServiceStatus ";

$add_member = $db_object->query($select);



  $result=mysql_query($select);
       while($row=mysql_fetch_array ($result))
            {
              $output1 =$row['ServiceNo'];
  $output2 =$row['ServiceName'];
  $output3 =$row['Status'];
  $output4 =$row['DateTime'];


$your_data .= " $output1.\t $output2 -> $output3 -> $output4 \n";

$output = "$your_data \n";


}

// Open the file and erase the contents if any
$fp = fopen("vas_status.log", "a");


// Write the data to the file fwrite($fp, $output);


// Close the file fclose($fp);


if (DB::isError($add_member)) { die($add_member->getMessage()); }

       $db_object->disconnect();

?>


thanx in advance

curlys

-- Regards, Ben Ramsey http://benramsey.com

---------------------------------------------------
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---------------------------------------------------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








-- Regards, Ben Ramsey http://benramsey.com

---------------------------------------------------
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---------------------------------------------------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to