[PLUG] command line php execution

Matt Alexander m at netpro.to
Thu Jun 20 01:17:27 UTC 2002


If you have PHP 4.2 or greater, you can use the command line php command:

http://www.php.net/manual/en/features.commandline.php

> Hi All,
>
> I've got another problem that I need ideas for.  I would like to be able
> to have a php script (or program -- I'm not sure what to call it) run as
> a cron job.  From what I can tell, the interpreter has to be run through
> the web server, which means that I need to be able to call a .php file
> from a command line browser, then have it die when the php script has
> finished doing the voodoo that it needs to do.  Calling the .php file is
> not a big problem, lynx does it well enough from a shell script, but
> convincing it to die at the appropriate time is more problematic.
>
> I'm sure this is possible, this is linux after all. I think what I need
> is to be able to grab the PID, stuff it in a variable, then kill that
> process.  I can't figure out how to grab the PID though.
>
> Are there other ways to get this job done?
>
> TIA
>
> Derek Loree





More information about the PLUG mailing list