1. Skipping CRON for Now... But...

Can I create a program that just sits there and every, say, minute, sends out an
email, but doesn't waste system resources between each minute? Will sleep() do
that efficiently enough?

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » topic index » view message » categorize

2. Re: Skipping CRON for Now... But...

cklester wrote:
> Can I create a program that just sits there and every, say, minute, sends out
> an
> email, but doesn't waste system resources between each minute? Will sleep() do
> that efficiently enough?

Yes.
sleep(60) will tell the operating system to run
other programs for 60 seconds, before returning
to your program. Your program will not burn up
any CPU time while sleeping. That might be a good way
of sending out a bunch of e-mails without overloading
the system and getting your hosting company annoyed with you.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu