Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

red hat/cpanel/cron help needed... Please?

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Critique My Website  
Author Message
viper

External


Since: Jul 04, 2003
Posts: 149



(Msg. 1) Posted: Wed Jan 14, 2004 11:45 pm
Post subject: red hat/cpanel/cron help needed... Please?
Archived from groups: alt>www>webmaster (more info?)

Ok I have a few sites that all need cron to run to work/update... There was
so many running at tone time it would crash the server...

A friend told me to try this..

login as root and in cron put
*/20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1

CCcrons.sh has...
/usr/bin/lynx --dump http://www.domain1.com/scripts/admin/cronjobs.php
/usr/bin/lynx --dump http://www.domain2.net/scripts/admin/cronjobs.php
/usr/bin/lynx --dump http://www.domain3.com/scripts/admin/cronjobs.php
/usr/bin/lynx --dump http://www.domain4.com/scripts/admin/cronjobs.php
/usr/bin/lynx --dump http://www.domain5.com/scripts/admin/cronjobs.php
etc....

He told me this would run each one right after the other so none ran at the
same time... BUT for some reason I am ending up with it doing odd things...
say one site has 5 things qued up to do... it should work on one until its
done then the next time cron runs do the next... well it does all 5 things
at once and does more than one site at a time... any ideas?

 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
nospam34

External


Since: Oct 20, 2003
Posts: 294



(Msg. 2) Posted: Thu Jan 15, 2004 9:14 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Viper wrote:

 > Ok I have a few sites that all need cron to run to work/update... There
 > was so many running at tone time it would crash the server...

Why not run run them as individual jobs, one at 7 mins past the hour, the
next at 17 mins past the hour, etc


By the way, in a shared hosting environment, try not running cron at
multiples of 5 or 10 past the hour. If all users run jobs at these regular
times, the system will regularly grind to a halt.

gtoomey<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
viper

External


Since: Jul 04, 2003
Posts: 149



(Msg. 3) Posted: Thu Jan 15, 2004 9:14 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Toomey wrote:
 > Viper wrote:
 >
  >> Ok I have a few sites that all need cron to run to work/update...
  >> There was so many running at tone time it would crash the server...
 >
 > Why not run run them as individual jobs, one at 7 mins past the hour,
 > the next at 17 mins past the hour, etc
 >
 >
 > By the way, in a shared hosting environment, try not running cron at
 > multiples of 5 or 10 past the hour. If all users run jobs at these
 > regular times, the system will regularly grind to a halt.
 >
 > gtoomey

The script they all run needs them to run every 10 minutes... cant run once
an hour... I tried making them different times like 5 10 15 etc... uptp 30
minutes... cashed the server again... Sad
Guess Ill figure something out.. Sad<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 4) Posted: Fri Jan 16, 2004 2:40 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Viper" <viper RemoveThis @venomx.com> wrote in message
news:C4-dnRdty5Y5bZjdRVn_iw@comcast.com...
 > Ok I have a few sites that all need cron to run to work/update... There
was
 > so many running at tone time it would crash the server...
 >
 > A friend told me to try this..
 >
 > login as root and in cron put
 > */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
 >
 > CCcrons.sh has...
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</font</a>>
 > etc....
 >
 > He told me this would run each one right after the other so none ran at
the
 > same time... BUT for some reason I am ending up with it doing odd
things...
 > say one site has 5 things qued up to do... it should work on one until its
 > done then the next time cron runs do the next... well it does all 5 things
 > at once and does more than one site at a time... any ideas?
 >
Instead of getting cron to run each script why not just get it to run the
first
Then, at the end of each script, after it has completed its job get each
script to call the next
(possibly include).<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
user272

External


Since: Oct 23, 2003
Posts: 137



(Msg. 5) Posted: Fri Jan 16, 2004 2:41 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bill Logan wrote:

 >
 > "Viper" <viper.DeleteThis@venomx.com> wrote in message
 > news:C4-dnRdty5Y5bZjdRVn_iw@comcast.com...
  >> Ok I have a few sites that all need cron to run to work/update... There
 > was
  >> so many running at tone time it would crash the server...
  >>
  >> A friend told me to try this..
  >>
  >> login as root and in cron put
  >> */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
  >>
  >> CCcrons.sh has...
<font color=green>  >> /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</font</a>>
<font color=green>  >> /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</font</a>>
<font color=green>  >> /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</font</a>>
<font color=green>  >> /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</font</a>>
<font color=green>  >> /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</font</a>>
  >> etc....
  >>
  >> He told me this would run each one right after the other so none ran at
 > the
  >> same time... BUT for some reason I am ending up with it doing odd
 > things...
  >> say one site has 5 things qued up to do... it should work on one until
  >> its done then the next time cron runs do the next... well it does all 5
  >> things
  >> at once and does more than one site at a time... any ideas?
  >>
 > Instead of getting cron to run each script why not just get it to run the
 > first
 > Then, at the end of each script, after it has completed its job get each
 > script to call the next
 > (possibly include).

Here try this
Change the format of CCcrons.sh to something like this:

#CCcrons.sh
#!/bin/sh
/usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</a>
/usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</a>
/usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</a>
/usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</a>
/usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</a>


Note the #!/bin/sh

Now the cron line:

*/20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1

Are you sure that you want to run this every 20 hours on the hour? Or do you
want once a nite at 8:00pm. If the latter is what you want then you need:

* 20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1

This should run them one at a time.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
viper

External


Since: Jul 04, 2003
Posts: 149



(Msg. 6) Posted: Sat Jan 17, 2004 12:13 am
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Baho Utot wrote:
 > Bill Logan wrote:
 >
  >>
  >> "Viper" <viper RemoveThis @venomx.com> wrote in message
  >> news:C4-dnRdty5Y5bZjdRVn_iw@comcast.com...
   >>> Ok I have a few sites that all need cron to run to work/update...
   >>> There was so many running at tone time it would crash the server...
   >>>
   >>> A friend told me to try this..
   >>>
   >>> login as root and in cron put
   >>> */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
   >>>
   >>> CCcrons.sh has...
   >>> /usr/bin/lynx --dump
   >>> <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</a> /usr/bin/lynx
<font color=brown>   >>> --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</font</a>>
   >>> /usr/bin/lynx --dump
   >>> <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</a> /usr/bin/lynx
<font color=brown>   >>> --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</font</a>>
   >>> /usr/bin/lynx --dump
   >>> <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</a> etc....
   >>>
   >>> He told me this would run each one right after the other so none
   >>> ran at the same time... BUT for some reason I am ending up with it
   >>> doing odd things... say one site has 5 things qued up to do... it
   >>> should work on one until its done then the next time cron runs do
   >>> the next... well it does all 5 things
   >>> at once and does more than one site at a time... any ideas?
   >>>
  >> Instead of getting cron to run each script why not just get it to
  >> run the first
  >> Then, at the end of each script, after it has completed its job get
  >> each script to call the next
  >> (possibly include).
 >
 > Here try this
 > Change the format of CCcrons.sh to something like this:
 >
 > #CCcrons.sh
 > #!/bin/sh
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</font</a>>
 >
 >
 > Note the #!/bin/sh
 >
 > Now the cron line:
 >
 > */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
 >
 > Are you sure that you want to run this every 20 hours on the hour? Or
 > do you want once a nite at 8:00pm. If the latter is what you want
 > then you need:
 >
 > * 20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
 >
 > This should run them one at a time.

*/20 * * * * /home should be every 20 minutes....<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 7) Posted: Sat Jan 17, 2004 8:04 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Viper" <viper.RemoveThis@venomx.com> wrote in message
news:C4-dnRdty5Y5bZjdRVn_iw@comcast.com...
 > Ok I have a few sites that all need cron to run to work/update... There
was
 > so many running at tone time it would crash the server...
 >
 > A friend told me to try this..
 >
 > login as root and in cron put
 > */20 * * * * /home/jwshcom/CCcrons.sh >/dev/null 2>&1
 >
 > CCcrons.sh has...
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain1.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain1.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain2.net/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain2.net/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain3.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain3.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain4.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain4.com/scripts/admin/cronjobs.php</font</a>>
<font color=purple> > /usr/bin/lynx --dump <a style='text-decoration: underline;' href="http://www.domain5.com/scripts/admin/cronjobs.php</font" target="_blank">http://www.domain5.com/scripts/admin/cronjobs.php</font</a>>
 > etc....
 >
 > He told me this would run each one right after the other so none ran at
the
 > same time... BUT for some reason I am ending up with it doing odd
things...
 > say one site has 5 things qued up to do... it should work on one until its
 > done then the next time cron runs do the next... well it does all 5 things
 > at once and does more than one site at a time... any ideas?
 >
First of all, remember *nix is a multi-tasking environment. In most cases if
cron is given several things to do - in the absence of controls - ( a simple
sequence of commands eg) it will do them, to all intents and purposes, at
the same time. Another factor is the complexity (resource usage) of the
scripts being executed by cron will have an effect on timing. A fast small
script in the 5th cron command will run and finish before the much larger
and slower script in the 2nd command as an example.

As far as crashing the server, you would need to be using up considerable
resources for that to happen. Are you sure that is what is happening and
there is not something in your scripts that is creating the problem?

Not sure if you are aware, and no one seems to have mentioned - but - -
You can use cron to run another script that itself controls the action!

Have you tried to run the scripts sequentially with control, (as a test
measure) with cron e-mailing you any error messages

E.G. If you use cron to run mycron. every 20 minutes then
In your mycron. script

check time
if time = a run script 1 | trap error | mail
if time = b run script 2 | trap error | mail
if time = c run script 3 | trap error | mail
end
#etc, etc, etc.

Note - the above is just the algo - I leave the scripting to you depending
on your choice Smile<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
viper

External


Since: Jul 04, 2003
Posts: 149



(Msg. 8) Posted: Sun Jan 18, 2004 3:15 am
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bill Logan wrote:
  >>
 > First of all, remember *nix is a multi-tasking environment. In most
 > cases if cron is given several things to do - in the absence of
 > controls - ( a simple sequence of commands eg) it will do them, to
 > all intents and purposes, at the same time. Another factor is the
 > complexity (resource usage) of the scripts being executed by cron
 > will have an effect on timing. A fast small script in the 5th cron
 > command will run and finish before the much larger and slower script
 > in the 2nd command as an example.
 >
 > As far as crashing the server, you would need to be using up
 > considerable resources for that to happen. Are you sure that is what
 > is happening and there is not something in your scripts that is
 > creating the problem?
 >
 > Not sure if you are aware, and no one seems to have mentioned - but -
 > -
 > You can use cron to run another script that itself controls the
 > action!
 >
 > Have you tried to run the scripts sequentially with control, (as a
 > test measure) with cron e-mailing you any error messages
 >
 > E.G. If you use cron to run mycron. every 20 minutes then
 > In your mycron. script
 >
 > check time
 > if time = a run script 1 | trap error | mail
 > if time = b run script 2 | trap error | mail
 > if time = c run script 3 | trap error | mail
 > end
 > #etc, etc, etc.
 >
 > Note - the above is just the algo - I leave the scripting to you
 > depending on your choice Smile

The scripts have not changed much in the area thats giving me a problem. I
run and hosts sites that people connfirm opt in to to get paid to read email
ads, or goto the site and click ads. The script has an emailer that is ran
by a script called by the cronjob... it sends emails, updates earnings and
stuff like that every 15 minutes. Well everyone had it set to run every 15
minutes which really loaded up the servers load... I changed some to 5
minutes and 10 minutes but they still seemed to all be running about the
same time since most have 1000 to 5000 members.

I use to be able to make up a few ads/emails and hit send on them all and it
would send one... after it was done it would move to the next in the list.
Well with all the crashing the programmer of the scripts told me how he set
his freebsd servers up to make the sites run one email at a time... basicly
it sends site ones first email then moves to site two... etc.. well he set
it up for me.. and al heck broke loose... say site 1 had 3 emails all
waiting and sites 2 and 3 had 2... well it would send all 7 emails at the
same time... the scripts also can be set up to send mysql backups... well it
would also send 2 copies of the backup from the same site minutes a part...

He says the emailer shouldnt send 2 emails from the same site at the same
time but now even if I go back to the plan cronjob it sends two at a time...
he says he has not touched the email script since before I had the
problems.. He now thinks is a server issue... but the server hasnt changed
either unless cpanel upgraded something and it chnaged how it works.. not
sure Sad<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 9) Posted: Sun Jan 18, 2004 10:35 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Viper" <viper DeleteThis @venomx.com> wrote in message
news:qZmdnRjJjo3ni5fdRVn-gQ@comcast.com...
 > Bill Logan wrote:
   > >>
  > > First of all, remember *nix is a multi-tasking environment. In most
  > > cases if cron is given several things to do - in the absence of
  > > controls - ( a simple sequence of commands eg) it will do them, to
  > > all intents and purposes, at the same time. Another factor is the
  > > complexity (resource usage) of the scripts being executed by cron
  > > will have an effect on timing. A fast small script in the 5th cron
  > > command will run and finish before the much larger and slower script
  > > in the 2nd command as an example.
  > >
  > > As far as crashing the server, you would need to be using up
  > > considerable resources for that to happen. Are you sure that is what
  > > is happening and there is not something in your scripts that is
  > > creating the problem?
  > >
  > > Not sure if you are aware, and no one seems to have mentioned - but -
  > > -
  > > You can use cron to run another script that itself controls the
  > > action!
  > >
  > > Have you tried to run the scripts sequentially with control, (as a
  > > test measure) with cron e-mailing you any error messages
  > >
  > > E.G. If you use cron to run mycron. every 20 minutes then
  > > In your mycron. script
  > >
  > > check time
  > > if time = a run script 1 | trap error | mail
  > > if time = b run script 2 | trap error | mail
  > > if time = c run script 3 | trap error | mail
  > > end
  > > #etc, etc, etc.
  > >
  > > Note - the above is just the algo - I leave the scripting to you
  > > depending on your choice Smile
 >
 > The scripts have not changed much in the area thats giving me a problem. I
 > run and hosts sites that people connfirm opt in to to get paid to read
email
 > ads, or goto the site and click ads. The script has an emailer that is ran
 > by a script called by the cronjob... it sends emails, updates earnings and
 > stuff like that every 15 minutes. Well everyone had it set to run every 15
 > minutes which really loaded up the servers load... I changed some to 5
 > minutes and 10 minutes but they still seemed to all be running about the
 > same time since most have 1000 to 5000 members.
 >
 > I use to be able to make up a few ads/emails and hit send on them all and
it
 > would send one... after it was done it would move to the next in the list.
 > Well with all the crashing the programmer of the scripts told me how he
set
 > his freebsd servers up to make the sites run one email at a time...
basicly
 > it sends site ones first email then moves to site two... etc.. well he set
 > it up for me.. and al heck broke loose... say site 1 had 3 emails all
 > waiting and sites 2 and 3 had 2... well it would send all 7 emails at the
 > same time... the scripts also can be set up to send mysql backups... well
it
 > would also send 2 copies of the backup from the same site minutes a
part...
 >
 > He says the emailer shouldnt send 2 emails from the same site at the same
 > time but now even if I go back to the plan cronjob it sends two at a
time...
 > he says he has not touched the email script since before I had the
 > problems.. He now thinks is a server issue... but the server hasnt changed
 > either unless cpanel upgraded something and it chnaged how it works.. not
 > sure Sad
 >
You do realise you are looking at several areas?
E.G. Is it cron or is it the mail prg?
cron may be sending stuff correctly but your mail prg may be queuing the
mail - it happens.
For instance, if the mail program cannot contact the recipient server or
gets a wrong answer (one it does not expect) from the rdns it may queue the
mail and try later - result = several mails being sent all at once.
You do not say if you are sysadmin on the server or if you have a reseller
account. The difference is that if you are not the sysadmin (with su privs)
you are not going to be able to control / change the way the mail prog
sends. If you are sysadmin then maybe you need to run some tests independant
from what you are doing. Check the mail prg conf and get cron to run some
simple stuf and send you e-mail reports. If the problem is with cron and /
or the mail program it will show. If all works fine then you may need to
have another look at the scripts you are trying to use.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
viper

External


Since: Jul 04, 2003
Posts: 149



(Msg. 10) Posted: Sun Jan 18, 2004 10:35 pm
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bill Logan wrote:
 > "Viper" <viper DeleteThis @venomx.com> wrote in message
 > news:qZmdnRjJjo3ni5fdRVn-gQ@comcast.com...
  >> Bill Logan wrote:
   >>>>
   >>> First of all, remember *nix is a multi-tasking environment. In most
   >>> cases if cron is given several things to do - in the absence of
   >>> controls - ( a simple sequence of commands eg) it will do them, to
   >>> all intents and purposes, at the same time. Another factor is the
   >>> complexity (resource usage) of the scripts being executed by cron
   >>> will have an effect on timing. A fast small script in the 5th cron
   >>> command will run and finish before the much larger and slower script
   >>> in the 2nd command as an example.
   >>>
   >>> As far as crashing the server, you would need to be using up
   >>> considerable resources for that to happen. Are you sure that is what
   >>> is happening and there is not something in your scripts that is
   >>> creating the problem?
   >>>
   >>> Not sure if you are aware, and no one seems to have mentioned - but
   >>> - -
   >>> You can use cron to run another script that itself controls the
   >>> action!
   >>>
   >>> Have you tried to run the scripts sequentially with control, (as a
   >>> test measure) with cron e-mailing you any error messages
   >>>
   >>> E.G. If you use cron to run mycron. every 20 minutes then
   >>> In your mycron. script
   >>>
   >>> check time
   >>> if time = a run script 1 | trap error | mail
   >>> if time = b run script 2 | trap error | mail
   >>> if time = c run script 3 | trap error | mail
   >>> end
   >>> #etc, etc, etc.
   >>>
   >>> Note - the above is just the algo - I leave the scripting to you
   >>> depending on your choice Smile
  >>
  >> The scripts have not changed much in the area thats giving me a
  >> problem. I run and hosts sites that people connfirm opt in to to get
  >> paid to read email ads, or goto the site and click ads. The script
  >> has an emailer that is ran by a script called by the cronjob... it
  >> sends emails, updates earnings and stuff like that every 15 minutes.
  >> Well everyone had it set to run every 15 minutes which really loaded
  >> up the servers load... I changed some to 5 minutes and 10 minutes
  >> but they still seemed to all be running about the same time since
  >> most have 1000 to 5000 members.
  >>
  >> I use to be able to make up a few ads/emails and hit send on them
  >> all and it would send one... after it was done it would move to the
  >> next in the list. Well with all the crashing the programmer of the
  >> scripts told me how he set his freebsd servers up to make the sites
  >> run one email at a time... basicly it sends site ones first email
  >> then moves to site two... etc.. well he set it up for me.. and al
  >> heck broke loose... say site 1 had 3 emails all waiting and sites 2
  >> and 3 had 2... well it would send all 7 emails at the same time...
  >> the scripts also can be set up to send mysql backups... well it
  >> would also send 2 copies of the backup from the same site minutes a
  >> part...
  >>
  >> He says the emailer shouldnt send 2 emails from the same site at the
  >> same time but now even if I go back to the plan cronjob it sends two
  >> at a time... he says he has not touched the email script since
  >> before I had the problems.. He now thinks is a server issue... but
  >> the server hasnt changed either unless cpanel upgraded something and
  >> it chnaged how it works.. not sure Sad
  >>
 > You do realise you are looking at several areas?
 > E.G. Is it cron or is it the mail prg?
 > cron may be sending stuff correctly but your mail prg may be queuing
 > the mail - it happens.
 > For instance, if the mail program cannot contact the recipient server
 > or gets a wrong answer (one it does not expect) from the rdns it may
 > queue the mail and try later - result = several mails being sent all
 > at once.
 > You do not say if you are sysadmin on the server or if you have a
 > reseller account. The difference is that if you are not the sysadmin
 > (with su privs) you are not going to be able to control / change the
 > way the mail prog sends. If you are sysadmin then maybe you need to
 > run some tests independant from what you are doing. Check the mail
 > prg conf and get cron to run some simple stuf and send you e-mail
 > reports. If the problem is with cron and / or the mail program it
 > will show. If all works fine then you may need to have another look
 > at the scripts you are trying to use.

I am the sysadmin.. I talked to the programmer last night and he thinks its
maybe exim that cant keep up. He suggested I try qmail. Is there that big of
a difference between sendmail/exim and qmail?<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 11) Posted: Mon Jan 19, 2004 11:14 am
Post subject: Re: red hat/cpanel/cron help needed... Please? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Viper" <viper.DeleteThis@venomx.com> wrote in message
news:Bq-dnbFdL-PBOJfdRVn-iQ@comcast.com...
 > Bill Logan wrote:
  > > "Viper" <viper.DeleteThis@venomx.com> wrote in message
  > > news:qZmdnRjJjo3ni5fdRVn-gQ@comcast.com...
   > >> Bill Logan wrote:
   > >>>>
<snip>
  > > You do not say if you are sysadmin on the server or if you have a
  > > reseller account. The difference is that if you are not the sysadmin
  > > (with su privs) you are not going to be able to control / change the
  > > way the mail prog sends. If you are sysadmin then maybe you need to
  > > run some tests independant from what you are doing. Check the mail
  > > prg conf and get cron to run some simple stuf and send you e-mail
  > > reports. If the problem is with cron and / or the mail program it
  > > will show. If all works fine then you may need to have another look
  > > at the scripts you are trying to use.
 >
 > I am the sysadmin.. I talked to the programmer last night and he thinks
its
 > maybe exim that cant keep up. He suggested I try qmail. Is there that big
of
 > a difference between sendmail/exim and qmail?
There can be. Also where there is a control panel setup on a server it can
do strange things.
Control panels are designed to make it easy for the end user (hosted site
owners)
This means everything is set to the lowest common denominator. Some of my
servers with control panels have problems that are never seen on my servers
that have standard nix set ups (no control panel)
It all depens on how everything is configured. I use sendmail and have never
had any problems that could not be tracked to other apps. You may find
changing prgs does not improve things. I would sugest you test cron and
sendmail first with some basic test runs and error checking. That will tell
you if it is cron or sendmail. If the test runs do not produce the same
problems then it must be with the scripts. If you get the same result with
testing then try another mail program.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: red hat/cpanel/cron help needed... Please? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
i have a probleme with cpanel - i am webmaster of a site when i was to login to the control panel i recieve this message Invalid License File what is the probleme

cPanel prevents hotlinking? - I have an opportunity to move to a dedicated server running cPanel. Problem is I'm not familiar with it, and while I can learn quickly, I do have a question - is it true that cPanel has some sort of option that you can turn on/off that prevents..

Cpanel/Webppliance alternatives - Hi, Could anyone recomend a free (as in beer or speech) alternative to CPanel and Webbpliance? A look around sourceforge wasn't too helpful. Any ideas or links are most appreciated. Thanks

cPanel - configuring webalizer? - Does anyone know if it's possible to configure a domain's or sub-domain's usage of webalizer within cPanel or WHM? I'm with Page-Zone, and I've got a big enough account to have WHM access. I have a sub-domain, album.dweeb.org, and I'd like to modify it...

cpanel hosts "hidden" downtime... - I think I mentioned this before, and no-one was able to come up with anything to refute it... so I'm asking again - can anyone tell me if there is a flaw in assuming that every time a cpan customer adds a domain, it must restart the apache webserver? If...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]