Re: [PHP] executing php scripts via cron

2004-05-19 Thread raditha dissanayake
Merlin wrote:
Hi there,
I am trying to run a php script via cron. Problem is, that it does not 
work if I include the whole path in crontab

Currently it looks like:
0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php  
/dev/null
does typing in php /home/www/project/app_cron/follow_up_new_members.php 
 /dev/null
at the command line work for you?

Most likeley because the webserver root for the project is:
/home/www/project/
Are you sure the directory permissions are correct? sometimes when you 
tighten security you run into situations like this.

--
Raditha Dissanayake.
-
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] executing php scripts via cron

2004-05-18 Thread Merlin
Hi there,
I am trying to run a php script via cron. Problem is, that it does not work if I 
include the whole path in crontab

Currently it looks like:
0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php  /dev/null
Most likeley because the webserver root for the project is:
/home/www/project/
So if I go into this dir and execute:
php app_cron/follow_up_new_members.php
it workes. But not with the full path. What do I have to enter into crontab? It 
obviosly does not work with the full path, but how to change into the directory 
via cron first?

Thank you for any help,
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] executing php scripts via cron

2004-05-18 Thread rich
 I am trying to run a php script via cron. Problem is, that it
 does not work if I
 include the whole path in crontab

 Currently it looks like:
 0 6 * * * php
 /home/www/project/app_cron/follow_up_new_members.php  /dev/null

 Most likeley because the webserver root for the project is:
 /home/www/project/

 So if I go into this dir and execute:
 php app_cron/follow_up_new_members.php

 it workes. But not with the full path. What do I have to enter
 into crontab? It
 obviosly does not work with the full path, but how to change into
 the directory
 via cron first?

It is probably because the cron daemon cannot find the php binary in its
path try it like this...

 0 6 * * * /full/path/to/php/binary/php
/home/www/project/app_cron/follow_up_new_members.php  /dev/null

hth
rich

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



Re: [PHP] executing php scripts via cron

2004-05-18 Thread Clifford W. Hansen
Merlin,
 0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php  /dev/
null

That looks right to me, have you tried executing the command with the full 
path?

I have a couple of php scripts running as cron jobs and web scripts...

Also try php -q scriptname -q is for quiet which suppresses the html headers

-- 
Thank You,

Clifford W. Hansen
Operations Support Developer
Aspivia (Pty) Ltd.

+27 (0) 11 259-1150 (Switchboard)
+27 (0) 11 259-1019 (Fax)
+27 (0) 83 761-0240 (Mobile)
[EMAIL PROTECTED] (EMail)
http://chansen.aspivia.com (Web)

We have seen strange things today! Luke 5:26

This message contains information intended for the perusal, and/or use (if so 
stated), of the stated addressee(s) only. The information is confidential and 
privileged. If you are not an intended recipient, do not peruse, use, 
disseminate, distribute, copy or in any manner rely upon the information 
contained in this message (directly or indirectly). The sender and/or the 
entity represented by the sender shall not be held accountable in the event 
that this prohibition is disregarded.

If you receive this message in error, notify the sender immediately by e-mail, 
fax or telephone and return and/or destroy the original message.

The views or representations contained in this message, whether express or 
implied, are those of the sender only, unless that sender expressly states 
them to be the views or representations of an entity or person, who shall be 
named by the sender and who the sender shall state to represent. No liability 
shall otherwise attach to any other entity or person.

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