[PHP] cron job problem

2012-10-23 Thread Jim Giner
I have a php script that has been triggered by my hoster's cron 
process(?) to run once a day since last March.  It's been running fine - 
and I've made no changes to it.  Suddenly in the last couple of days it 
is running twice it seems.  The whole process sends an email at its 
conclusion and the receipient tells me today that she's getting two 
emails only a minute apart.


Any ideas on why this might happen?  I haven't contact my host company 
yet - thought I'd ask around first.


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



Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 4:48 PM, Jim Giner jim.gi...@albanyhandball.com wrote:
 I have a php script that has been triggered by my hoster's cron process(?)
 to run once a day since last March.  It's been running fine - and I've made
 no changes to it.  Suddenly in the last couple of days it is running twice
 it seems.  The whole process sends an email at its conclusion and the
 receipient tells me today that she's getting two emails only a minute apart.

 Any ideas on why this might happen?  I haven't contact my host company yet -
 thought I'd ask around first.

Though not really a PHP question, there are several reasons this
could happen, including a race condition that is being encountered due
to a slowdown of the host system or changes to the system's
environment.  Are the emails she's receiving identical?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



Re: [PHP] cron job problem

2012-10-23 Thread Jim Giner

On 10/23/2012 4:56 PM, Daniel Brown wrote:

On Tue, Oct 23, 2012 at 4:48 PM, Jim Giner jim.gi...@albanyhandball.com wrote:

I have a php script that has been triggered by my hoster's cron process(?)
to run once a day since last March.  It's been running fine - and I've made
no changes to it.  Suddenly in the last couple of days it is running twice
it seems.  The whole process sends an email at its conclusion and the
receipient tells me today that she's getting two emails only a minute apart.

Any ideas on why this might happen?  I haven't contact my host company yet -
thought I'd ask around first.


 Though not really a PHP question, there are several reasons this
could happen, including a race condition that is being encountered due
to a slowdown of the host system or changes to the system's
environment.  Are the emails she's receiving identical?


Yes - same msg same time

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



Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 4:59 PM, Jim Giner jim.gi...@albanyhandball.com wrote:

 Yes - same msg same time

If it wouldn't be a problem, can you provide the script here (or
on a site like Pastebin), as well as the crontab time entry for this?
While checking the crontab, make sure a duplicate entry for this
wasn't somehow added.

In the event that you'd like to keep this information from the
archives and general mailing list (and depending on the security
implications based upon what's divulged, I'd recommend it), I invite
you to send it to me privately, off-list, and I'll take a look at it
later tonight or tomorrow morning.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



Re: [PHP] cron job problem

2012-10-23 Thread Ashley Sheridan
On Tue, 2012-10-23 at 16:59 -0400, Jim Giner wrote:

 On 10/23/2012 4:56 PM, Daniel Brown wrote:
  On Tue, Oct 23, 2012 at 4:48 PM, Jim Giner jim.gi...@albanyhandball.com 
  wrote:
  I have a php script that has been triggered by my hoster's cron process(?)
  to run once a day since last March.  It's been running fine - and I've made
  no changes to it.  Suddenly in the last couple of days it is running twice
  it seems.  The whole process sends an email at its conclusion and the
  receipient tells me today that she's getting two emails only a minute 
  apart.
 
  Any ideas on why this might happen?  I haven't contact my host company yet 
  -
  thought I'd ask around first.
 
   Though not really a PHP question, there are several reasons this
  could happen, including a race condition that is being encountered due
  to a slowdown of the host system or changes to the system's
  environment.  Are the emails she's receiving identical?
 
 Yes - same msg same time
 


Are they definitely only in the cron list once? Could someone have tried
to help by adding the job into the daily.cron, but forgotten to remove
it from the regular crontab?
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] cron job problem

2012-10-23 Thread Ashley Sheridan
On Tue, 2012-10-23 at 17:12 -0400, Jim Giner wrote:

 
 
 On 10/23/2012 5:19 PM, Ashley Sheridan wrote:
 
  
  On Tue, 2012-10-23 at 16:59 -0400, Jim Giner wrote: 
  
   On 10/23/2012 4:56 PM, Daniel Brown wrote:
On Tue, Oct 23, 2012 at 4:48 PM, Jim Giner 
jim.gi...@albanyhandball.com wrote:
I have a php script that has been triggered by my hoster's cron 
process(?)
to run once a day since last March.  It's been running fine - and I've 
made
no changes to it.  Suddenly in the last couple of days it is running 
twice
it seems.  The whole process sends an email at its conclusion and the
receipient tells me today that she's getting two emails only a minute 
apart.
   
Any ideas on why this might happen?  I haven't contact my host company 
yet -
thought I'd ask around first.
   
 Though not really a PHP question, there are several reasons this
could happen, including a race condition that is being encountered due
to a slowdown of the host system or changes to the system's
environment.  Are the emails she's receiving identical?
   
   Yes - same msg same time
   
  
  
  Are they definitely only in the cron list once? Could someone have
  tried to help by adding the job into the daily.cron, but forgotten
  to remove it from the regular crontab?
  -- 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
  
  
  
 
 daily.cron?  regular crontab?  Don't know of what you speak.
 
 This is my only cron-initiated task.  My provider gives me a screen to
 enter the command and the desired time to run it and it's been that
 way for months.  I have had no need to change it so I'm surprised this
 is happening.
   


Crontab is the daemon which runs cron jobs, and some distros have set up
special files called cron.daily (or daily.cron I don't recall),
cron.hourly, etc to make it easier to schedule jobs.

As you're entering this through a control panel (presumably a web-based
one?) I would guess that's not the problem. It could be that the
hostings control panel software has had a hiccup?

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:


 Crontab is the daemon which runs cron jobs, and some distros have set up
 special files called cron.daily (or daily.cron I don't recall),
 cron.hourly, etc to make it easier to schedule jobs.

Quick clarification and correction here:

The cron *daemon* is crond, while the *script* that is
batch-processed by cron is called the crontab.  When it is executed,
it is referred to as a cron job.

That said, Ash is right about the rest.  Different OS flavors
(BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
different path and file standards.  Linux, in general, uses a command
`crontab` which opens the local user's environment-configured editor
to modify the user's crontab in the spool.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



Re: [PHP] cron job problem

2012-10-23 Thread David OBrien
On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown danbr...@php.net wrote:

 On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
 
 
  Crontab is the daemon which runs cron jobs, and some distros have set up
  special files called cron.daily (or daily.cron I don't recall),
  cron.hourly, etc to make it easier to schedule jobs.

 Quick clarification and correction here:

 The cron *daemon* is crond, while the *script* that is
 batch-processed by cron is called the crontab.  When it is executed,
 it is referred to as a cron job.

 That said, Ash is right about the rest.  Different OS flavors
 (BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
 different path and file standards.  Linux, in general, uses a command
 `crontab` which opens the local user's environment-configured editor
 to modify the user's crontab in the spool.

 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

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


script runs
ntp updates server time
script runs again?


Re: [PHP] cron job problem

2012-10-23 Thread Jim Giner

On 10/23/2012 6:18 PM, David OBrien wrote:

On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown danbr...@php.net wrote:


On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:



Crontab is the daemon which runs cron jobs, and some distros have set up
special files called cron.daily (or daily.cron I don't recall),
cron.hourly, etc to make it easier to schedule jobs.


 Quick clarification and correction here:

 The cron *daemon* is crond, while the *script* that is
batch-processed by cron is called the crontab.  When it is executed,
it is referred to as a cron job.

 That said, Ash is right about the rest.  Different OS flavors
(BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
different path and file standards.  Linux, in general, uses a command
`crontab` which opens the local user's environment-configured editor
to modify the user's crontab in the spool.

--
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



script runs
ntp updates server time
script runs again?


But why now?  This process has been running just fine for months.

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



Re: [PHP] cron job problem

2012-10-23 Thread Ashley Sheridan
On Tue, 2012-10-23 at 18:36 -0400, Jim Giner wrote:

 On 10/23/2012 6:18 PM, David OBrien wrote:
  On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown danbr...@php.net wrote:
 
  On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
  a...@ashleysheridan.co.uk wrote:
 
 
  Crontab is the daemon which runs cron jobs, and some distros have set up
  special files called cron.daily (or daily.cron I don't recall),
  cron.hourly, etc to make it easier to schedule jobs.
 
   Quick clarification and correction here:
 
   The cron *daemon* is crond, while the *script* that is
  batch-processed by cron is called the crontab.  When it is executed,
  it is referred to as a cron job.
 
   That said, Ash is right about the rest.  Different OS flavors
  (BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
  different path and file standards.  Linux, in general, uses a command
  `crontab` which opens the local user's environment-configured editor
  to modify the user's crontab in the spool.
 
  --
  /Daniel P. Brown
  Network Infrastructure Manager
  http://www.php.net/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  script runs
  ntp updates server time
  script runs again?
 
 But why now?  This process has been running just fine for months.
 


Have you tried removing the job entirely from cron and re-adding it? It
might be enough to kick-start the process into behaving.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] cron job problem

2012-10-23 Thread Jim Giner

On 10/23/2012 6:57 PM, Ashley Sheridan wrote:

On Tue, 2012-10-23 at 18:36 -0400, Jim Giner wrote:


On 10/23/2012 6:18 PM, David OBrien wrote:

On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown danbr...@php.net wrote:


On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:



Crontab is the daemon which runs cron jobs, and some distros have set up
special files called cron.daily (or daily.cron I don't recall),
cron.hourly, etc to make it easier to schedule jobs.


  Quick clarification and correction here:

  The cron *daemon* is crond, while the *script* that is
batch-processed by cron is called the crontab.  When it is executed,
it is referred to as a cron job.

  That said, Ash is right about the rest.  Different OS flavors
(BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
different path and file standards.  Linux, in general, uses a command
`crontab` which opens the local user's environment-configured editor
to modify the user's crontab in the spool.

--
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



script runs
ntp updates server time
script runs again?


But why now?  This process has been running just fine for months.




Have you tried removing the job entirely from cron and re-adding it? It
might be enough to kick-start the process into behaving.


Yes my host asked me to do that earlier.  And nope - no better.

I have told them it's gotta be something on their end because I tested 
the script from a browser displaying what it was doing and it ran fine. 
 Removed my debug settings and ran it from a browser and again it ran 
fine.  Re-scheduled the cron task and it ran wrong.


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



Re: [PHP] cron job problem

2012-10-23 Thread Ashley Sheridan
On Tue, 2012-10-23 at 18:51 -0400, Jim Giner wrote:

 On 10/23/2012 6:57 PM, Ashley Sheridan wrote:
  On Tue, 2012-10-23 at 18:36 -0400, Jim Giner wrote:
 
  On 10/23/2012 6:18 PM, David OBrien wrote:
  On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown danbr...@php.net wrote:
 
  On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
  a...@ashleysheridan.co.uk wrote:
 
 
  Crontab is the daemon which runs cron jobs, and some distros have set up
  special files called cron.daily (or daily.cron I don't recall),
  cron.hourly, etc to make it easier to schedule jobs.
 
Quick clarification and correction here:
 
The cron *daemon* is crond, while the *script* that is
  batch-processed by cron is called the crontab.  When it is executed,
  it is referred to as a cron job.
 
That said, Ash is right about the rest.  Different OS flavors
  (BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
  different path and file standards.  Linux, in general, uses a command
  `crontab` which opens the local user's environment-configured editor
  to modify the user's crontab in the spool.
 
  --
  /Daniel P. Brown
  Network Infrastructure Manager
  http://www.php.net/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  script runs
  ntp updates server time
  script runs again?
 
  But why now?  This process has been running just fine for months.
 
 
 
  Have you tried removing the job entirely from cron and re-adding it? It
  might be enough to kick-start the process into behaving.
 
 Yes my host asked me to do that earlier.  And nope - no better.
 
 I have told them it's gotta be something on their end because I tested 
 the script from a browser displaying what it was doing and it ran fine. 
   Removed my debug settings and ran it from a browser and again it ran 
 fine.  Re-scheduled the cron task and it ran wrong.
 


It does sound like it's definitely a problem their end. Could you alter
the script in some way to check for a token set on the correct schedule?
Or, perhaps rename the script and set up the cron to it again, so that
if there is a secondary link to it in cron it will fail, and might give
you an idea about where it's being called from.

I know this is all a crazy attempt to prove it's a problem with the
hosting, but from experience they can sometimes be slow to recognise it
without a lot of definite proof.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP cron job optimization

2011-09-12 Thread Igor Escobar
Use PHP threads. Do the job separately.. in parts... in other words... you
can't read all them at once.

You can read a little more about php multithreading here:
http://blog.motane.lu/2009/01/02/multithreading-in-php/

You can use a non-relational database like mongo or couchdb to manage where
you stop and where you have to look back to the RSS feed as well.

[]'s

Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar





On Sat, Sep 10, 2011 at 10:37 PM, Stuart Dallas stu...@3ft9.com wrote:

 On 10 Sep 2011, at 09:35, muad shibani wrote:

  I want to design an application that reads news from RSS sources.
  I have about 1000 RSS feed to collect from.
 
  I also will use Cron jobs every 15 minutes to collect the data.
  the question is: Is there a clever way to collect all those feed items
  without exhausting the server
  any Ideas

 I designed a job queuing system a while back when I had a similar problem.
 You can read about it here: http://stut.net/2009/05/29/php-job-queue/. Set
 that type of system up and add a job for each feed, set to run every 15
 minutes. You can then watch the server and tune the number of concurrent job
 processors so you get the optimum balance between load and speed.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP cron job optimization

2011-09-12 Thread Igor Escobar
Other good point is: always set a timeout connection when you're getting the
RSS data to avoid your thread get stuck unnecessary. Use cURL (is much more
faster then file_get_contents).

Multithreading in PHP with cURL http://devzone.zend.com/article/3341


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar





On Mon, Sep 12, 2011 at 10:05 AM, Igor Escobar titiolin...@gmail.comwrote:

 Use PHP threads. Do the job separately.. in parts... in other words... you
 can't read all them at once.

 You can read a little more about php multithreading here:
 http://blog.motane.lu/2009/01/02/multithreading-in-php/

 You can use a non-relational database like mongo or couchdb to manage where
 you stop and where you have to look back to the RSS feed as well.

 []'s

 Regards,
 Igor Escobar
 *Software Engineer
 *
 + http://blog.igorescobar.com
 + http://www.igorescobar.com
 + @igorescobar http://www.twitter.com/igorescobar






 On Sat, Sep 10, 2011 at 10:37 PM, Stuart Dallas stu...@3ft9.com wrote:

 On 10 Sep 2011, at 09:35, muad shibani wrote:

  I want to design an application that reads news from RSS sources.
  I have about 1000 RSS feed to collect from.
 
  I also will use Cron jobs every 15 minutes to collect the data.
  the question is: Is there a clever way to collect all those feed items
  without exhausting the server
  any Ideas

 I designed a job queuing system a while back when I had a similar problem.
 You can read about it here: http://stut.net/2009/05/29/php-job-queue/.
 Set that type of system up and add a job for each feed, set to run every 15
 minutes. You can then watch the server and tune the number of concurrent job
 processors so you get the optimum balance between load and speed.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





Re: [PHP] PHP cron job optimization

2011-09-12 Thread Eric Butera
On Mon, Sep 12, 2011 at 9:37 AM, Igor Escobar titiolin...@gmail.com wrote:
 Other good point is: always set a timeout connection when you're getting the
 RSS data to avoid your thread get stuck unnecessary. Use cURL (is much more
 faster then file_get_contents).

 Multithreading in PHP with cURL http://devzone.zend.com/article/3341


 Regards,
 Igor Escobar
 *Software Engineer
 *
 + http://blog.igorescobar.com
 + http://www.igorescobar.com
 + @igorescobar http://www.twitter.com/igorescobar





 On Mon, Sep 12, 2011 at 10:05 AM, Igor Escobar titiolin...@gmail.comwrote:

 Use PHP threads. Do the job separately.. in parts... in other words... you
 can't read all them at once.

 You can read a little more about php multithreading here:
 http://blog.motane.lu/2009/01/02/multithreading-in-php/

 You can use a non-relational database like mongo or couchdb to manage where
 you stop and where you have to look back to the RSS feed as well.

 []'s

 Regards,
 Igor Escobar
 *Software Engineer
 *
 + http://blog.igorescobar.com
 + http://www.igorescobar.com
 + @igorescobar http://www.twitter.com/igorescobar






 On Sat, Sep 10, 2011 at 10:37 PM, Stuart Dallas stu...@3ft9.com wrote:

 On 10 Sep 2011, at 09:35, muad shibani wrote:

  I want to design an application that reads news from RSS sources.
  I have about 1000 RSS feed to collect from.
 
  I also will use Cron jobs every 15 minutes to collect the data.
  the question is: Is there a clever way to collect all those feed items
  without exhausting the server
  any Ideas

 I designed a job queuing system a while back when I had a similar problem.
 You can read about it here: http://stut.net/2009/05/29/php-job-queue/.
 Set that type of system up and add a job for each feed, set to run every 15
 minutes. You can then watch the server and tune the number of concurrent job
 processors so you get the optimum balance between load and speed.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





Thread != Multi Process.

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



Re: [PHP] PHP cron job optimization

2011-09-12 Thread Igor Escobar
@Eric ok ;)


Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar





On Mon, Sep 12, 2011 at 10:52 AM, Eric Butera eric.but...@gmail.com wrote:

 On Mon, Sep 12, 2011 at 9:37 AM, Igor Escobar titiolin...@gmail.com
 wrote:
  Other good point is: always set a timeout connection when you're getting
 the
  RSS data to avoid your thread get stuck unnecessary. Use cURL (is much
 more
  faster then file_get_contents).
 
  Multithreading in PHP with cURL http://devzone.zend.com/article/3341
 
 
  Regards,
  Igor Escobar
  *Software Engineer
  *
  + http://blog.igorescobar.com
  + http://www.igorescobar.com
  + @igorescobar http://www.twitter.com/igorescobar
 
 
 
 
 
  On Mon, Sep 12, 2011 at 10:05 AM, Igor Escobar titiolin...@gmail.com
 wrote:
 
  Use PHP threads. Do the job separately.. in parts... in other words...
 you
  can't read all them at once.
 
  You can read a little more about php multithreading here:
  http://blog.motane.lu/2009/01/02/multithreading-in-php/
 
  You can use a non-relational database like mongo or couchdb to manage
 where
  you stop and where you have to look back to the RSS feed as well.
 
  []'s
 
  Regards,
  Igor Escobar
  *Software Engineer
  *
  + http://blog.igorescobar.com
  + http://www.igorescobar.com
  + @igorescobar http://www.twitter.com/igorescobar
 
 
 
 
 
 
  On Sat, Sep 10, 2011 at 10:37 PM, Stuart Dallas stu...@3ft9.com
 wrote:
 
  On 10 Sep 2011, at 09:35, muad shibani wrote:
 
   I want to design an application that reads news from RSS sources.
   I have about 1000 RSS feed to collect from.
  
   I also will use Cron jobs every 15 minutes to collect the data.
   the question is: Is there a clever way to collect all those feed
 items
   without exhausting the server
   any Ideas
 
  I designed a job queuing system a while back when I had a similar
 problem.
  You can read about it here: http://stut.net/2009/05/29/php-job-queue/.
  Set that type of system up and add a job for each feed, set to run
 every 15
  minutes. You can then watch the server and tune the number of
 concurrent job
  processors so you get the optimum balance between load and speed.
 
  -Stuart
 
  --
  Stuart Dallas
  3ft9 Ltd
  http://3ft9.com/
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

 Thread != Multi Process.



[PHP] PHP cron job optimization

2011-09-10 Thread muad shibani
I want to design an application that reads news from RSS sources.
I have about 1000 RSS feed to collect from.

I also will use Cron jobs every 15 minutes to collect the data.
the question is: Is there a clever way to collect all those feed items
without exhausting the server
any Ideas
Thank you in advance


Re: [PHP] PHP cron job optimization

2011-09-10 Thread Sean Greenslade
On Sat, Sep 10, 2011 at 4:35 AM, muad shibani muad.shib...@gmail.comwrote:

 I want to design an application that reads news from RSS sources.
 I have about 1000 RSS feed to collect from.

 I also will use Cron jobs every 15 minutes to collect the data.
 the question is: Is there a clever way to collect all those feed items
 without exhausting the server
 any Ideas
 Thank you in advance


Do them one at a time. Fetching web pages isn't a particularly taxing job
for any decent server.

My advice is just to try it. Even if you solution isn't 'elegant' or
'clever,' if it works and doesn't bog down the server, that's a win in my
book.

-- 
--Zootboy

Sent from my PC.


Re: [PHP] PHP cron job optimization

2011-09-10 Thread Gary Golden
 I want to design an application that reads news from RSS sources.
 I have about 1000 RSS feed to collect from.

 I also will use Cron jobs every 15 minutes to collect the data.
 the question is: Is there a clever way to collect all those feed items
 without exhausting the server
 any Ideas
 Thank you in advance
Just watch your memory and you'll be fine.
As was stated fetching an rss feed is fast and cheap, so I would
contrariwise think about  paralleling if I would you.



signature.asc
Description: OpenPGP digital signature


Re: [PHP] PHP cron job optimization

2011-09-10 Thread MUAD SHIBANI
thanks a lot after I test it I will share the code .. Thanks again

On Sat, Sep 10, 2011 at 11:20 AM, Gary Golden m...@garygolden.me wrote:

  I want to design an application that reads news from RSS sources.
  I have about 1000 RSS feed to collect from.
 
  I also will use Cron jobs every 15 minutes to collect the data.
  the question is: Is there a clever way to collect all those feed items
  without exhausting the server
  any Ideas
  Thank you in advance
 Just watch your memory and you'll be fine.
 As was stated fetching an rss feed is fast and cheap, so I would
 contrariwise think about  paralleling if I would you.




-- 
*
___

Muad Shibani*
*
*
Aden Yemen
Mobile: 00967 733045678
Mobile: 00967 711811232

www.muadshibani.com


Re: [PHP] PHP cron job optimization

2011-09-10 Thread Eric Butera
On Sat, Sep 10, 2011 at 1:47 PM, Sean Greenslade zootboys...@gmail.com wrote:
 On Sat, Sep 10, 2011 at 4:35 AM, muad shibani muad.shib...@gmail.comwrote:

 I want to design an application that reads news from RSS sources.
 I have about 1000 RSS feed to collect from.

 I also will use Cron jobs every 15 minutes to collect the data.
 the question is: Is there a clever way to collect all those feed items
 without exhausting the server
 any Ideas
 Thank you in advance


 Do them one at a time. Fetching web pages isn't a particularly taxing job
 for any decent server.

 My advice is just to try it. Even if you solution isn't 'elegant' or
 'clever,' if it works and doesn't bog down the server, that's a win in my
 book.

 --
 --Zootboy

 Sent from my PC.


Traversing the internet is one of the most expensive IO operations
that can be performed.  The OP should try and split the work into
several processes and utilize async connections via a mechanism like
curl_multi [1].  Doing 1,000 connections one at a time is abysmal if
you're blocked for even 3 seconds per connection.

I'd work by making a two step process that has one cron job for
constantly fetching/updating feeds into a store  then another process
that constantly checks for updates inside aforementioned store.

[1] http://us3.php.net/manual/en/function.curl-multi-add-handle.php

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



Re: [PHP] PHP cron job optimization

2011-09-10 Thread Stuart Dallas
On 10 Sep 2011, at 09:35, muad shibani wrote:

 I want to design an application that reads news from RSS sources.
 I have about 1000 RSS feed to collect from.
 
 I also will use Cron jobs every 15 minutes to collect the data.
 the question is: Is there a clever way to collect all those feed items
 without exhausting the server
 any Ideas

I designed a job queuing system a while back when I had a similar problem. You 
can read about it here: http://stut.net/2009/05/29/php-job-queue/. Set that 
type of system up and add a job for each feed, set to run every 15 minutes. You 
can then watch the server and tune the number of concurrent job processors so 
you get the optimum balance between load and speed.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Merlin Morgenstern

Hi there,

I would like to run a php file via cron job and there is a parameter to 
be passed. Unfortunatelly this does not work:


# /usr/local/bin/php /home/www/create_notification_emails.php?tf=2
Could not open input file: /home/www/create_notification_emails.php?tf=2

The problem seems to be the ?tf=2

How do I pass parameters to this script? I need the same script but 
executed in different time frames which is passed by the parameter.


Any ideas?

Thank you for any hint,

Merlin

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



Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Aschwin Wesselius

Merlin Morgenstern wrote:

Hi there,

I would like to run a php file via cron job and there is a parameter 
to be passed. Unfortunatelly this does not work:


# /usr/local/bin/php /home/www/create_notification_emails.php?tf=2
Could not open input file: /home/www/create_notification_emails.php?tf=2

The problem seems to be the ?tf=2

How do I pass parameters to this script? I need the same script but 
executed in different time frames which is passed by the parameter.


Any ideas?

Thank you for any hint,

Merlin


Hi Merlin,

Commandline arguments (for things like Cron) are a bit different than 
URL parameters.


Try lookup information on argv and argc:

http://www/php.net/features.commandline
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other'/


Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Jochem Maas
Merlin Morgenstern schreef:
 Hi there,
 
 I would like to run a php file via cron job and there is a parameter to
 be passed. Unfortunatelly this does not work:
 
 # /usr/local/bin/php /home/www/create_notification_emails.php?tf=2
 Could not open input file: /home/www/create_notification_emails.php?tf=2
 
 The problem seems to be the ?tf=2

something like:

/usr/local/bin/php /home/www/create_notification_emails.php -tf=2

you can retrieve input args via $argv variable - I suggest finding a
package that parses this input for you so you don't have to manually
do it, search for something like php GetOpt package ... PEAR has one
for sure.

 How do I pass parameters to this script? I need the same script but
 executed in different time frames which is passed by the parameter.
 
 Any ideas?
 
 Thank you for any hint,
 
 Merlin
 


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



Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Merlin Morgenstern

Hello Jochem,

thank you this has solved my problem:
bla.php 2
$tf = $argv[1];

Best regards,

Merlin

Jochem Maas wrote:

Merlin Morgenstern schreef:

Hi there,

I would like to run a php file via cron job and there is a parameter to
be passed. Unfortunatelly this does not work:

# /usr/local/bin/php /home/www/create_notification_emails.php?tf=2
Could not open input file: /home/www/create_notification_emails.php?tf=2

The problem seems to be the ?tf=2


something like:

/usr/local/bin/php /home/www/create_notification_emails.php -tf=2

you can retrieve input args via $argv variable - I suggest finding a
package that parses this input for you so you don't have to manually
do it, search for something like php GetOpt package ... PEAR has one
for sure.


How do I pass parameters to this script? I need the same script but
executed in different time frames which is passed by the parameter.

Any ideas?

Thank you for any hint,

Merlin





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



Re: [PHP] Pass parameters via url inside a php cron job

2008-09-25 Thread Daniel Brown
On Thu, Sep 25, 2008 at 6:34 AM, Merlin Morgenstern
[EMAIL PROTECTED] wrote:
 Hello Jochem,

 thank you this has solved my problem:
 bla.php 2
 $tf = $argv[1];

Conversely, on a *NIX system, if you want to grab it via the web -
locally or from a remote server - you can do this:


* * * * * /bin/env GET
http://www.example.com/index.html?example=given;  /dev/null 21
(^--- cron schedule) (^--- your URL)

-- 
/Daniel P. Brown
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

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



[PHP] cron job style php...

2005-01-16 Thread Russell P Jones
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...

2005-01-16 Thread Randy Johnson
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: php-general@lists.php.net
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


RE: [PHP] cron job style php...

2005-01-16 Thread Hans Zaunere

 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
?php

Note that the opening tag is required.  No closing tag is required.
 
Note that you can/should compile PHP to contain the CLI binary (new releases
do).  You can check what kind of PHP binary you have using -v:

Shell /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...

2005-01-16 Thread Bret Hughes
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...

2005-01-16 Thread Ligaya Turmelle
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

[PHP] Cron Job in vDeck

2004-06-03 Thread Matt Palermo
Hey guys.  I was wondering if anyone knows how to go about creating a cron
job using vDeck (that's what is installed on the server) that just accesses
a PHP file and runs everything in the PHP file.  Does anyone know how to go
about doing something like this?

Thanks,

Matt
http://sweetphp.com

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



[PHP] cron job for php not working

2004-05-20 Thread Merlin
Hi there,
I am trying to install following cron job:
0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php
The script works, if I run this php /home... line manually it works out, but 
it does not automaticaly at 6 am as supposed.

I do also see in /var/log/messages that the cron job has happened at that time, 
but the file did not generate the emails like it supposed to.

I am running the crontab as webserver user.
Thanx for any helpful ideas on that,
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] cron job for php not working

2004-05-20 Thread Jay Blanchard
[snip]
I am trying to install following cron job:
0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php

The script works, if I run this php /home... line manually it works
out, but 
it does not automaticaly at 6 am as supposed.

I do also see in /var/log/messages that the cron job has happened at
that time, 
but the file did not generate the emails like it supposed to.
[/snip]

At the command line type which php and it will return the full path to
php. Modify your line in the crontab with the full path...

0 6 * * * /usr/local/bin/php
/home/www/project/app_cron/follow_up_new_members.php

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



Re: [PHP] cron job for php not working

2004-05-20 Thread James E Hicks III
On Thursday 20 May 2004 11:35 am, Jay Blanchard wrote:
 At the command line type which php and it will return the full path to
 php. Modify your line in the crontab with the full path...

 0 6 * * * /usr/local/bin/php
 /home/www/project/app_cron/follow_up_new_members.php

I always put the #!/usr/local/bin/php at the top of all my command line php 
scripts. Mine is actually #!/usr/bin/php. Then chmod 755 the file so that it 
can execute.

James Hicks

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



Re: [PHP] cron job for php not working

2004-05-20 Thread Tim Traver
It looks like that cron line is making it so that the command runs as the 
user php...

so, you should check if that user has permission to run the script.
Tim.
At 08:33 AM 5/20/2004, Merlin wrote:
Hi there,
I am trying to install following cron job:
0 6 * * * php /home/www/project/app_cron/follow_up_new_members.php
The script works, if I run this php /home... line manually it works out, 
but it does not automaticaly at 6 am as supposed.

I do also see in /var/log/messages that the cron job has happened at that 
time, but the file did not generate the emails like it supposed to.

I am running the crontab as webserver user.
Thanx for any helpful ideas on that,
Merlin
--
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

2003-06-17 Thread Paul Marinas

Is there a way to run a script (to check a table for new fields, or to
check time..etc) evrey few hours, without using programes souch as
crontab.


Paul
GnuPG Key http://sgi.rdscv.ro/~paulm/paulm.PGP

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



RE: [PHP] cron job

2003-06-17 Thread Jay Blanchard
[snip]
Is there a way to run a script (to check a table for new fields, or to
check time..etc) evrey few hours, without using programes souch as
crontab.
[/snip]

You could run a looping script with a sleep statement in it, not a good
idea though.

Jay

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



Re: [PHP] cron job

2003-06-17 Thread David Nicholson
Hello,


This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 17:59,
lines prefixed by '' were originally written by you.
 Is there a way to run a script (to check a table for new fields, or to
 check time..etc) evrey few hours, without using programes souch as
 crontab.
 Paul
 GnuPG Key http://sgi.rdscv.ro/~paulm/paulm.PGP

Using a cron job is by far the best bet, if you are not allowed cron jobs
on the webserver do you have access to another computer that you can run
cron jobs on (you could call the PHP script using lynx from the other
server).

A work around is that you could have an include in each of your pages that
checks the time and decides whether to do the tasks you were going to do
in the cron job.  This will only work if you have a busy site and if your
cron job does not take long to execute though.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)

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



Re: [PHP] cron job

2003-06-17 Thread CPT John W. Holmes
 Is there a way to run a script (to check a table for new fields, or to
 check time..etc) evrey few hours, without using programes souch as
 crontab.

In addition to what others have said, you don't _have_ to set up the cron
job (or any scheduled job) on the same computer as your scripts. If you have
a Cable/DSL connection, you could set up a cron job on your own computer to
connect to http://www.yourdomain.com/cron.php and run it when you need it.
If you have windows, you can even do the same thing with Task Scheduler.
Yeah, it makes things a little more difficult, but it's doable.

---John Holmes...


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



[PHP] Cron Job help Needed

2003-02-19 Thread Pushpinder Singh Garcha
Hello All,

I need to ask you about some resources for cron jobs. Please suggest 
some online help

Thanks
Pushpinder Singh Garcha
_
Web Architect


Re: [PHP] Cron Job help Needed

2003-02-19 Thread Ray Hunter
Do a search at google for cron jobs tutorial...

http://www.google.com/search?q=cron+job+tutorials

That should give you lots to read... :)

--
Ray


On Wed, 2003-02-19 at 13:36, Pushpinder Singh Garcha wrote:
 Hello All,
 
 I need to ask you about some resources for cron jobs. Please suggest 
 some online help
 
 Thanks
 Pushpinder Singh Garcha
 _
 Web Architect




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




Re: [PHP] CRON JOB

2002-07-17 Thread José León Serna

MAAS wrote:

What do I have to do before I can run my file.php as a cron job in Linux?

What problem do you have? I have no problems with it calling it as php 
myfile.php

-- 
Best Regards.
--
QaDRAM Studio, RAD development for the web
http://studio.qadram.com




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




Re: [PHP] CRON JOB

2002-07-17 Thread Jason Wong

On Wednesday 17 July 2002 20:51, MAAS wrote:
 What do I have to do before I can run my file.php as a cron job in Linux?

search archives for cron.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Never underestimate the power of a small tactical nuclear weapon.
*/


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




[PHP] CRON JOB

2002-07-17 Thread MAAS


What do I have to do before I can run my file.php as a cron job in Linux?




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




RE: [PHP] CRON JOB

2002-07-17 Thread Jay Blanchard

[snip]
What do I have to do before I can run my file.php as a cron job in Linux?
[/snip]

Look at the archives for the past couple of days, it has been covered in
some detail. Make sure to compile PHP without apsx, and for practical
purposes move the PHP executable to the /usr/local/bin directory. Then put
this as the first line of the PHP file you want to run from a CRON;

#!/usr/local/bin/php

Then set up your CRON.

HTH!

Jay

Philosophy is a study that lets us be unhappy more intelligently.

*
* Want to meet other PHP developers *
* in your area? Check out:  *
* http://php.meetup.com/*
* No developer is an island ... *
*



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




RE: [PHP] CRON JOB

2002-07-17 Thread Miguel Cruz

On Wed, 17 Jul 2002, Jay Blanchard wrote:
 Look at the archives for the past couple of days, it has been covered in
 some detail. Make sure to compile PHP without apsx, and for practical
 purposes move the PHP executable to the /usr/local/bin directory. Then put
 this as the first line of the PHP file you want to run from a CRON;
 
 #!/usr/local/bin/php
 
 Then set up your CRON.

Might want to add the -q flag to the php bangpath invocation.

miguel


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




[PHP] Cron Job

2002-02-07 Thread karthikeyan

Hi,

  How do i set cron job on Red Hat Linux.

  Looking forward for yours response.

karthikeyan.



RE: [PHP] Cron Job

2002-02-07 Thread Michael Geier

This is an inappropriate question for this list.
I would suggest either a book on learning Unix (almost any flavor will do)
or seeking any number of Linux mailing lists for questions concerning the
OS.

-Original Message-
From: karthikeyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cron Job


Hi,

  How do i set cron job on Red Hat Linux.

  Looking forward for yours response.

karthikeyan.


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




[PHP] cron job problem.

2002-01-10 Thread Mehmet Kamil ERISEN

Hello All,
I have a php script that i tested first through my browser.
If has a simple mail() command.
It workd fine and I received the email.
not I tried to run it as a cron job by adding 
#!/usr/local/bin/php -q
My webmaster account receives the confirmation that cron
job has run, but I do not receive the emails that the
program is 
supposed to send.
This is the code:
Thanks for the help...

#!/usr/local/bin/php -q
?php
$subject=Cron Job has run;
$body=test.php is running now;
$sendtome = [EMAIL PROTECTED];
mail($sendtome, $subject, $body);
?
--- mike cullerton [EMAIL PROTECTED] wrote:
 #!/usr/local/bin/php -q
 
 on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED]
 wrote:
 
  I've got this problem that won't go away.
  
  The headers are showing up at the top of the page when
 I run php in
  cgi mode. any ideas?
 
 
  -- mike cullerton 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP] cron job problem.

2002-01-10 Thread Daniel Alsen

Hmm...don?t you have to actually create a job in crontab?

Saying that you want a mail every day at 6:00 you would want to create
something like:

* 6 * * * php /usr/local/bin/php  /dev/null

in crontab and lose #!/usr/local/bin/php -q in your script.

# Daniel Alsen| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #


 Hello All,
 I have a php script that i tested first through my browser.
 If has a simple mail() command.
 It workd fine and I received the email.
 not I tried to run it as a cron job by adding
 #!/usr/local/bin/php -q
 My webmaster account receives the confirmation that cron
 job has run, but I do not receive the emails that the
 program is
 supposed to send.
 This is the code:
 Thanks for the help...

 #!/usr/local/bin/php -q
 ?php
 $subject=Cron Job has run;
 $body=test.php is running now;
 $sendtome = [EMAIL PROTECTED];
 mail($sendtome, $subject, $body);
 ?
 --- mike cullerton [EMAIL PROTECTED] wrote:
  #!/usr/local/bin/php -q
 
  on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED]
  wrote:
 
   I've got this problem that won't go away.
  
   The headers are showing up at the top of the page when
  I run php in
   cgi mode. any ideas?
 
 
   -- mike cullerton
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 


 =
 Mehmet Erisen
 http://www.erisen.com

 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] cron job problem.

2002-01-10 Thread Mehmet Kamil ERISEN

Hi,
thanks for the reply.  I did setup the crontab already to
run every minute.
the webmaster account receives the report.
Here is the output that I get when I remove the
#!/usr/local/bin/php -q


/home/webvoire/www/cm/test.php: ?php: No such file or
directory
/home/webvoire/www/cm/test.php: =Cron Job has run: command
not found
/home/webvoire/www/cm/test.php: =test.php is running now:
command not found
/home/webvoire/www/cm/test.php: =: command not found
/home/webvoire/www/cm/test.php: syntax error near
unexpected token `mail($sendtome,'
/home/webvoire/www/cm/test.php:
/home/webvoire/www/cm/test.php: line 6: `   
mail($sendtome, $subject, $body);'
--- Daniel_Alsen [EMAIL PROTECTED] wrote:
 Hmm...don?t you have to actually create a job in crontab?
 
 Saying that you want a mail every day at 6:00 you would
 want to create
 something like:
 
 * 6 * * * php /usr/local/bin/php  /dev/null
 
 in crontab and lose #!/usr/local/bin/php -q in your
 script.
 
 # Daniel Alsen| www.mindbash.com #
 # [EMAIL PROTECTED]  | +46 704 86 14 92 #
 # ICQ: 63006462   | +46 8 694 82 22  #
 # PGP: http://www.mindbash.com/pgp/  #
 
 
  Hello All,
  I have a php script that i tested first through my
 browser.
  If has a simple mail() command.
  It workd fine and I received the email.
  not I tried to run it as a cron job by adding
  #!/usr/local/bin/php -q
  My webmaster account receives the confirmation that
 cron
  job has run, but I do not receive the emails that the
  program is
  supposed to send.
  This is the code:
  Thanks for the help...
 
  #!/usr/local/bin/php -q
  ?php
  $subject=Cron Job has run;
  $body=test.php is running now;
  $sendtome = [EMAIL PROTECTED];
  mail($sendtome, $subject, $body);
  ?
  --- mike cullerton [EMAIL PROTECTED] wrote:
   #!/usr/local/bin/php -q
  
   on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED]
   wrote:
  
I've got this problem that won't go away.
   
The headers are showing up at the top of the page
 when
   I run php in
cgi mode. any ideas?
  
  
-- mike cullerton
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
  
 
 
  =
  Mehmet Erisen
  http://www.erisen.com
 
  __
  Do You Yahoo!?
  Send FREE video emails in Yahoo! Mail!
  http://promo.yahoo.com/videomail/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]