RE: [PHP] time based execution
| From: | Maxim Maletsky | Date: | Wed, 18 Oct 2000 02:33:37 +0000 |
| Subject: | RE: [PHP] time based execution | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20759@lists.php.net to get a copy of this message | ||
Yes you can:
in cron you use lynx -dump
http://your.domain.com/the/script.php?your=variables
it perfectly works, plus you can pass the variables, plus you can run the
script automatically from ANY server in this world.
Check emails of last Friday... we were discussing it a lot..
Here's the copy of one:
Cheers!
==========================
hey man, no problem =)
-----Original Message-----
From: Maxim Maletsky [mailto:maxim@japaninc.net]
Sent: Thursday, October 12, 2000 8:46 PM
To: 'Mark Peoples'; 'Jason Cox'
Cc: 'PHP General List. (E-mail)'
Subject: RE: [PHP] Cron and archives [SOLUTION]
Thank you Mark (and you Jason) for helping me out with cron.
Your suggestions were very instructive and VERY HELPFUL.
Cron now is perfectly working letting my script connect to SSL each 15
minutes and report me when these poor customers are reaching broken links
with credit card in hand.
:-))
Love this mailing list!
-----Original Message-----
From: Mark Peoples [mailto:gascsd@gascairlines.com]
Sent: Friday, October 13, 2000 11:02 AM
To: php-general@lists.php.net
Subject: RE: [PHP] Cron and archives
my bad. =) i'm spoiled because i've got php as a few cgis and a module on
the webserver. i remembered seeing the command for lynx a long time ago, but
couldn't remember it exactly <g>
marco
-----Original Message-----
From: Jason Cox [mailto:jasonc@webpipe.net]
Sent: Thursday, October 12, 2000 7:01 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Cron and archives
I believe the lynx command should be "lynx -dump http://yea.com
..."
It's kinda different than most Unix commands/application because it only
uses a single "-".
Jason
-----Original Message-----
From: Mark Peoples [mailto:gascsd@gascairlines.com]
Sent: Thursday, October 12, 2000 7:48 PM
To: 'PHP General List. (E-mail)'
Subject: RE: [PHP] Cron and archives
argh, the url wrapped...each line in your crontab should be on one line:
14,29,44,59 * * * * lynx --dump http://yea.com ...
marco
-----Original Message-----
From: Mark Peoples [mailto:gascsd@gascairlines.com]
Sent: Thursday, October 12, 2000 6:45 PM
To: 'PHP General List. (E-mail)'
Subject: RE: [PHP] Cron and archives
Assuming you are allowed to run cron jobs...try these
If you have PHP as a CGI:
14,29,44,59 * * * * /path/to/php/cgi/php -f /path/to/php/cgi-script
If you only have it as a module:
14,29,44,59 * * * * lynx --dump
http://full.url.to/script?with=and-params&you=need&to=pass
On your linux box, type: crontab -e and put those line(s) in there.
I use the first one (using the CGI) with no problems.
marco
-----Original Message-----
From: Maxim Maletsky [mailto:maxim@japaninc.net]
Sent: Thursday, October 12, 2000 6:40 PM
To: 'PHP General List. (E-mail)'
Subject: [PHP] Cron and archives
Hi guys,
I've seen dozens of postings here about how to use cron so I though:
whenever I'll need it just go to archives. And so I did. But, archives did
not answer my questions at all. Sure I found lot's of staff, but trying it
all it still doesn't work, I guess I'm lost in some details.
my question is easy:
Step by step explain me how to run a php file with cron every 15 minutes.
What do I have to write in cron, what (if needed) to be modified in the
script, what are the php configurations necessary to do this kind of job.
My Data:
System: PHP 4.0.1pl2 on Linux
PHP file: think about it this way: connects to localhost thought
a specified port (443 SSL), if fails a warning email is being sent
Tests made: Working perfectly from browser, but not cron, cron log
claims that it activated the file, however I see no email sent, no MySQL
entry ..
All I need is to step by step instructions on what to do, where to check,
and how to do it.
I would really appreciate your help.
Thanks !
P.S: this email can also be useful for later achieve searches.
Maxim Maletsky - maxim@j-door.com <mailto:maxim@j-door.com>
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109
http://www.j-door.com <http://www.j-door.com/>
http://www.japaninc.net <http://www.japaninc.net/>
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>
====================================
-----Original Message-----
From: Andrew Rush [mailto:andy@mainetoday.com]
Sent: Tuesday, October 17, 2000 9:47 PM
To: Maxim Maletsky
Cc: 'manohar sadhasivam'
Subject: RE: [PHP] time based execution
On Tuesday, October 17, 2000, at 04:44 AM, Maxim Maletsky wrote:
> type:
>
> man cron
>
> in command prompt.
<snip>
> Thanks. But i am very new to Linux and php runs as Apache module in my
> server.
you cannot run a PHP cron when you have PHP running as an Apache module (at
least that what our tech guy said when i asked him). we had to compile a
standalone binary to get crons working.