pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: [Fwd: [ph-linux-newbie] help on cron]
3+ messages / 3 participants
[nested] [flat]

* [Fwd: [ph-linux-newbie] help on cron]
@ 2002-11-07 16:02 Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-11-07 14:53 ` Re: [Fwd: [ph-linux-newbie] help on cron] mixo <mixo@beth.uniforum.org.za>
  2002-11-07 16:52 ` Re: [Fwd: [ph-linux-newbie] help on cron] scott.marlowe <scott.marlowe@ihs.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Joseph Syjuco @ 2002-11-07 16:02 UTC (permalink / raw)
  To: pgsql-php


id like to execute a php file automatically during certain periods of
time so what i did i installed php-cgi (which allows me to execute php
using cmd php <php file>).  Ive finished my php script, tried it and it
worked but when i put it in crontab
* * * * * php /usr/local/apache/htdocs/xxx.php
it didnt work ... it didnt spew any errors ... just did nothing
in order to verify if cron is working properly i added a new entry
* * * * * rm /home/postgres/test.txt
when i inspected the results ... 2nd script worked (rm) but not the php
script
any ideas whats wrong?  
path of script is ok and path is working when i execute it in command
line
TIA
joseph



_______________________________________________
ph-linux-newbie mailing list
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
plug website http://plug.linux.org.ph
to unsubscribe, send 'unsubscribe' to ph-linux-newbie-request@lists.q-linux.com

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Fwd: [ph-linux-newbie] help on cron]
  2002-11-07 16:02 [Fwd: [ph-linux-newbie] help on cron] Joseph Syjuco <joseph@asti.dost.gov.ph>
@ 2002-11-07 14:53 ` mixo <mixo@beth.uniforum.org.za>
  1 sibling, 0 replies; 3+ messages in thread

From: mixo @ 2002-11-07 14:53 UTC (permalink / raw)
  To: Joseph Syjuco <joseph@asti.dost.gov.ph>; +Cc: pgsql-php

try :

* * * * * /path/to/php -i /usr/local/apache/htdocs/xxx.php


Joseph Syjuco wrote:

>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> [ph-linux-newbie] help on cron
> From:
> Joseph Syjuco <joseph@asti.dost.gov.ph>
> Date:
> 07 Nov 2002 15:58:12 +0000
> To:
> ph-linux-newbie@lists.q-linux.com
>
>
>id like to execute a php file automatically during certain periods of
>time so what i did i installed php-cgi (which allows me to execute php
>using cmd php <php file>).  Ive finished my php script, tried it and it
>worked but when i put it in crontab
>* * * * * php /usr/local/apache/htdocs/xxx.php
>it didnt work ... it didnt spew any errors ... just did nothing
>in order to verify if cron is working properly i added a new entry
>* * * * * rm /home/postgres/test.txt
>when i inspected the results ... 2nd script worked (rm) but not the php
>script
>any ideas whats wrong?  
>path of script is ok and path is working when i execute it in command
>line
>TIA
>joseph
>
>
>
>_______________________________________________
>ph-linux-newbie mailing list
>http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
>plug website http://plug.linux.org.ph
>to unsubscribe, send 'unsubscribe' to ph-linux-newbie-request@lists.q-linux.com
>  
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>  
>






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Fwd: [ph-linux-newbie] help on cron]
  2002-11-07 16:02 [Fwd: [ph-linux-newbie] help on cron] Joseph Syjuco <joseph@asti.dost.gov.ph>
@ 2002-11-07 16:52 ` scott.marlowe <scott.marlowe@ihs.com>
  1 sibling, 0 replies; 3+ messages in thread

From: scott.marlowe @ 2002-11-07 16:52 UTC (permalink / raw)
  To: Joseph Syjuco <joseph@asti.dost.gov.ph>; +Cc: pgsql-php

On 7 Nov 2002, Joseph Syjuco wrote:

> worked but when i put it in crontab
> * * * * * php /usr/local/apache/htdocs/xxx.php
> it didnt work ... it didnt spew any errors ... just did nothing

Try editing your php script so the first line looks something like this:

#!/usr/local/bin/php -q
<?php
script goes here
?>

Note that the /usr/local/bin part might be different on your box than on 
mine.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-11-07 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07 16:02 [Fwd: [ph-linux-newbie] help on cron] Joseph Syjuco <joseph@asti.dost.gov.ph>
2002-11-07 14:53 ` mixo <mixo@beth.uniforum.org.za>
2002-11-07 16:52 ` scott.marlowe <scott.marlowe@ihs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox