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  wrote:
> >>>
>  On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
>   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.
> 
>  --
>  
>  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] 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  wrote:


On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
 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.

--

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: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  wrote:
> >
> >> On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
> >>  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.
> >>
> >> --
> >> 
> >> 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:18 PM, David OBrien wrote:

On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown  wrote:


On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
 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.

--

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 David OBrien
On Tue, Oct 23, 2012 at 5:31 PM, Daniel Brown  wrote:

> On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
>  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.
>
> --
> 
> 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 Daniel Brown
On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
 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.

-- 

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 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 
> > > >  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 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  
> > 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 Daniel Brown
On Tue, Oct 23, 2012 at 4:59 PM, Jim Giner  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.

-- 

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  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:48 PM, Jim Giner  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?

-- 

Network Infrastructure Manager
http://www.php.net/

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