Please reply to the list so that others can see the conversation.

Search for cron on Google to learn more about it. You can also type
"man cron" and "man crontab" on the command-line. I would suggest
writing a simple PHP wrapper script that checks the DB, runs the Perl
script if it needs to, and stores the Perl script's output. You could
also write the wrapper in Perl or just alter the Perl script. :-)

On Wed, 21 Jul 2004 10:45:15 -0700, bruce <[EMAIL PROTECTED]> wrote:
> ok...
> 
> so how could i start a cron job which basically just fires off the perl
> script that i need to run...
> 
> i'm using rh8.0... never played with cron jobs...
> 
> thanks...
> 
> -bruce
> 
> 
> 
> 
> -----Original Message-----
> From: Justin Patrin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 21, 2004 10:27 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] exec/system question..
> 
> On Wed, 21 Jul 2004 10:09:52 -0700, bruce <[EMAIL PROTECTED]> wrote:
> > hey...
> >
> > looking at initiating a perl app from inside a php web app. basically, the
> > user will hit a button/start the app...the perl script will take awhile to
> > complete, so i'd like to run the app and then continue on with the php
> > process...
> >
> > so my question boils down to what's the best approach.
> >
> > 1) i could run the perl app, and wait until it finishes, and then continue
> > with the logic. the app will use the results of the perl script and stuff
> it
> > into a db/tbl, so i need to get the results of the perl app.
> >
> > 2) i could run the perl script, and have it somehow run in the
> > background.... this would ba good, if there's a way to essentially run the
> > php script in the background such that it doesn't hang apache. i'd like to
> > kick off the php, and have the php/web app return. i could set some form
> of
> > session var to trigger off of when the php is complete..
> >
> > any thoughts/pointers/etc...
> >
> 
> AFAIK there's no way to do this. When the request ends (user hits
> stop, exit or die called) the process is ended. This includes
> children. If you could set it off asynchronously, there would be no
> way of knowing when it ended as the process wouldn't have access to
> that session any more.
> 
> I would suggest setting a value in a table and have a cron job check
> for those values, run the script if it's supposed to, then update the
> table with the results. Then the PHP script can check the table to see
> it it's done.
> 
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
> 
> paperCrane --Justin Patrin--
> 
> 
> !DSPAM:40fea88634771443815979!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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

Reply via email to