Re: cron jobs in PHP admin to run a PHP file
- From: "C. (http://symcbean.blogspot.com/)" <colin.mckinnon@xxxxxxxxx>
- Date: Wed, 28 May 2008 06:05:31 -0700 (PDT)
On May 27, 11:57 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
JRough wrote:
On May 27, 12:44 pm, "Paul Lautman" <paul.laut...@xxxxxxxxxxxxxx>
wrote:
JRough wrote:
On May 27, 11:32 am, "Paul Lautman" <paul.laut...@xxxxxxxxxxxxxx>You assume incorrectly. Your hosting company should tell you what the path
wrote:
JRough wrote:SO the php interpreter would be normally be in my http docs somewhere
I want to run a php script every day. The page goes to a directoryusually you would put the path to the php interpreter followed by any
and
parses a file and adds data to the database. Where it says
"command" in cron jobs I don't know what it is looking for? Can I
put the name of my php file?
This is what I have:
Minute Hour Day Month Weekday
Command 1 8 1-7 1-31
* myPage.php
The reason I am asking is I don't have a clue what PHPadmin wants
in the command box. All I want to do is run the php script.
Thanks,
janis
required options followed by the script file name
under where I installed php
but this server is web hosted so I'm assuming it is the url I use to
run the scirpt in my browser.
thanks,
is (it is usually the path that BravoFoxtrot mentioned). They may have it in
a faq somewhere.
Okay, I checked around for the full url but all I can see is what I
see in PHPAdmin files. In phpAdmin
it says I am at the home/userName and the rest is where the pages are
stored.
home/userName/myWebSiteName/myDatabasename/myPage.php
Where do I put in "bin/php" as suggested above or is that for a
command line interface?Would it be
home/userName/myWebSiteName/myDatabaseName/bin/php/myPage.phg? Or do
I leave the /bin/php out of it.
I am trying to figure out how to send email to the tech support.
You're still thinking the php executable is in your web directory. It
is not. It is in something like /usr/bin/php - nowhere near your root
directory. But you need to ask tech support. Additionally, you have to
have permission to execute it.
And yes, it is for a command line interface. That's what cron jobs are
- command line jobs, executed by the system.
.....and just to confuse you even more - just because the webserver
will process PHP does not mean that the standalone PHP interpreter is
installed (typically a webserver uses an embedded version of PHP
loaded from a dynamic library).
If its not there, you may be able to invoke a fetch of a web page via
cron - but you need an additional program to do that - say wget, links
or curl - something like:
1 8 * * * /usr/bin/wget http://www.example.com/path/myPage.php >> /
dev/null
(note the 1-7 and 1-31 are redundant)
....and there's no guarantees that these programs are available, let
alone in /usr/bin/
C.
.
- References:
- Re: cron jobs in PHP admin to run a PHP file
- From: JRough
- Re: cron jobs in PHP admin to run a PHP file
- From: Jerry Stuckle
- Re: cron jobs in PHP admin to run a PHP file
- Prev by Date: Re: Parsing PHP with HTML file extension
- Next by Date: Re: Parsing PHP with HTML file extension
- Previous by thread: Re: cron jobs in PHP admin to run a PHP file
- Next by thread: sessions being destroyed prematurely
- Index(es):
Relevant Pages
|