Re: [PHP] cron job style php...
Check out here - http://www.htmlcenter.com/tutorials/tutorials.cfm/155/php/ and here - http://www.phpfreaks.com/tutorials/28/0.php and if you want to read about my learning with cron try here - http://www.khankennels.com/blog/index.php?p=103 Hope it all helps. Respectfully, Ligaya Turmelle Russell P Jones wrote: I have written a simple script that when a date in an array matches todays date, it sends an email (notifies me when bills are due). Any ideas on how to make this run once a day? Can you do a cron job on a PHP prog? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cron job style php...
On Sun, 2005-01-16 at 17:00, Russell P Jones wrote: > I have written a simple script that when a date in an array matches todays > date, it sends an email (notifies me when bills are due). Any ideas on how > to make this run once a day? Can you do a cron job on a PHP prog? > > Russ Jones Never tried it but on linux (RHL or Fedora) I would add a file to /etc/cron.daily with something like this in it /usr/bin/php /usr/local/bin/myjob.php where myjob.php is the php script. if it runs from the command link now it should work. This will run as root of course and if you wnated it to be run as someone else you could probably add the line: 0 2 * * * username /usr/bin/php /usr/local/bin/myjob.php to /etc/crontab or the users crontab without the username field. hth Bret -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cron job style php...
> I have written a simple script that when a date in an array matches todays > date, it sends an email (notifies me when bills are due). Any ideas on how > to make this run once a day? Can you do a cron job on a PHP prog? It can, and run basically like any other shell script. The first line needs to be the dash-bang that point to your PHP binary. #!/usr/local/php/bin/php /usr/local/php/bin/php -v To keep track of scripts that I run under Apache, versus those that run on the command line, I use the .psh extension on those that run on the command line. --- Hans Zaunere President, Founder New York PHP http://www.nyphp.org Gmail: The 1gb spam catcher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cron job style php...
Russel, Yes you can run a cron job on php You may have to add a line like this at the top, it has been awhile since I have done it] #! /usr/local/php/sapi/cli/php this line would be different for your system -Randy - Original Message - From: "Russell P Jones" <[EMAIL PROTECTED]> To: Sent: Sunday, January 16, 2005 6:00 PM Subject: [PHP] cron job style php... I have written a simple script that when a date in an array matches todays date, it sends an email (notifies me when bills are due). Any ideas on how to make this run once a day? Can you do a cron job on a PHP prog? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cron job style php...
I have written a simple script that when a date in an array matches todays date, it sends an email (notifies me when bills are due). Any ideas on how to make this run once a day? Can you do a cron job on a PHP prog? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php