freelanceprogrammers.org Forum Index » PHP

Runnning a process in background


View user's profile Post To page top
rodrigo22m Posted: Mon Aug 29, 2005 5:18 pm


Joined: 29 Aug 2005

Posts: 3
Runnning a process in background
Hello everyone, i need to run a process in background
as a separate thread, and check the status of that
thread every one in a while. It is possible to do
this?

Rodrigo


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Reply with quote
Send private message
View user's profile Post To page top
ruud@... Posted: Mon Aug 29, 2005 5:32 pm


Joined: 20 Jul 2005

Posts: 4
Runnning a process in background
I think cronjobs are what you are looking for.
Google for information about then ins and outs.

Good luck


-----Oorspronkelijk bericht-----
Van: php-objects@yahoogroups.com [mailto:php-objects@yahoogroups.com] Namens
Rodrigo Mendoza
Verzonden: maandag 29 augustus 2005 14:18
Aan: php-objects@yahoogroups.com
Onderwerp: [php-objects] Runnning a process in background

Hello everyone, i need to run a process in background
as a separate thread, and check the status of that
thread every one in a while. It is possible to do
this?

Rodrigo


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar



PHP Data object relational mapping generator - http://www.meta-language.net/

Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
fenzig27 Posted: Tue Aug 30, 2005 7:00 am


Joined: 08 Mar 2005

Posts: 8
Runnning a process in background
You can use the PHP extension PCNTL, however, it`s tricky to talk to
different threads. You have to using SHMOP or something along those
lines of communicating. I`m sure you can manufacture an alternate
communication route, there`s just no native way to talk to threads (as
far as I know, if someone knows I`d really be interested). A side note,
PCNTL is command line only, useful in a daemon situation. If you`re in
an apache environment you`re out of luck unfortunately.

Thank you,
Ryan Sexton

On Aug 29, 2005, at 8:18 AM, Rodrigo Mendoza wrote:

Hello everyone, i need to run a process in background
as a separate thread, and check the status of that
thread every one in a while. It is possible to do
this?

Rodrigo


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar



PHP Data object relational mapping generator -
http://www.meta-language.net/
Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
rodrigo22m Posted: Wed Aug 31, 2005 5:31 pm


Joined: 29 Aug 2005

Posts: 3
Runnning a process in background
Hi, cronjobs will do the trik but it does not solve my
problem because this job has to be trigger by the user
and i have no control over the OS. So the only thing
that i came up was to call the exec function with this
command:
exec ("php myPhpScript.php &");

Using the "&" i can make it to run in background but
this is only in linux/unix enviroments. As i said
before i have no control over the OS.

The things is i have to send a newsletter but every
email that is send is diferent so the process takes a
long time to finish. That is why i need a diferent
thread.

Anyone has an idea to solve this?

Thanks

Rodrigo.

--- "Bohaco, Ruud Alberts" <ruud@...> escribió:


---------------------------------
I think cronjobs are what you are looking for.
Google for information about then ins and outs.

Good luck


-----Oorspronkelijk bericht-----
Van: php-objects@yahoogroups.com
[mailto:php-objects@yahoogroups.com] Namens
Rodrigo Mendoza
Verzonden: maandag 29 augustus 2005 14:18
Aan: php-objects@yahoogroups.com
Onderwerp: [php-objects] Runnning a process in
background

Hello everyone, i need to run a process in background
as a separate thread, and check the status of that
thread every one in a while. It is possible to do
this?

Rodrigo


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam
¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar



PHP Data object relational mapping generator -
http://www.meta-language.net/

Yahoo! Groups Links








PHP Data object relational mapping generator -
http://www.meta-language.net/



---------------------------------
YAHOO! GROUPS LINKS


Visit your group "php-objects" on the web.

To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.


---------------------------------




__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot 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
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help