Re: Re: Cronjob
| From: | Mike Dunlop | Date: | Wed, 25 Sep 2002 18:21:41 +0000 |
| Subject: | Re: Re: Cronjob | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117605@lists.php.net to get a copy of this message | ||
Darren,
Do you want to use a shell script or a php page to run your queries?
- MD
Jason, I'm not using a web script any longer, I'm using command-line (I determined that it is installed on the server). I read about $argc and $argv, but when I call the script passing two arguments, both $argc and $argv are blank. Is this a php.ini setting I need to change or somethign? --- Jason Young <jason1@erols.com> wrote:-- Mike Dunlop Webmaster Animation World Network webmaster@awn.com http://www.awn.com (323) 606-4238 office (323) 466-6619 fax 6525 Sunset Blvd. GS10 Los Angeles, CA 90028 USASorry to butt in :) Arguments to web scripts are done in the format: page.php?arg1=data1&arg2=data2 So you would use that full string as the lynx path. Hope this helps :) -Jason Daren Cotter wrote:Thanks for the info Chris, it works! How do I pass arguments to the script? I'massumingit'd just be: test.php arg1 arg2 The stuff I've read says $argc should be the countofthe # of arguments, and $argv should be an array holding them...but when I do a simple: print "# of Arguments: $argc\n"; It prints nothing, not even 0 --- Chris Hewitt <g0pae@manordat.demon.co.uk>wrote:__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.comPHPOn Wed, 25 Sep 2002, Daren Cotter wrote:My problem, is that I absolutely NEED to run atherescript using crontab. The script needs to send numerous queries to a database every hour. Isindirectly? Are you sure its not already there? Commonly in /usr/bin. Try a "which php" and see if it finds anything? HTH Chrisany way I can accomplish this, directly or-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php