[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] PHP files in the CRON folders
- Subject: Re: [cobalt-users] PHP files in the CRON folders
- From: "Brian N. Smith" <support@xxxxxxxxxx>
- Date: Wed Jun 18 18:02:01 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
> This is my first question so please be kind, I have a PHP4 script that
> simply adds data to my mysql DB. I want it to run ever hour. I have
> extencive experience with php but not in programming within UNIX. Can
> someone please show me a sample script that you would use to execute a php
> script. I tried using the following under root and saving it as a file
> under etc/cron.hourly/test.pl the contents of the script are:
>
> /home/sites/www.whatever.com/web/test.pl
>
pico myfile.php
-----------] inside of the myfile.php [-------------------
#!/usr/bin/php
<?php
print "Does this work\n\n";
?>
--------] Now Save & Exit [---------
chmod 750 myfile.php
chown root:root myfile.php
Now try that it works
./myfile.php
Does this work
Hey, it worked! :-)
Then just add the application to your cron.hourly folder
Thanks,
Brian
--
This message has been scanned for viruses and
dangerous content by MailScanner & F-Prot, and is
believed to be clean.