Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 15th, 2002, 05:07 AM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Cron Reasearch

Hi,

I'm doing a little research for a freebie script I'm building and wondered if any of you could help. Basically the script is to do with Cron and Running a PHP file, all I am looking for is possible methods of running a PHP script from the crontab.

At the moment I have the most common 3:

wgets
fetch
lynx

Are there any others I should be bothered about?

Cheers
__________________
---------------------
-- SilkySmooth --
---------------------
Proxy | Little Directory

Reply With Quote
  #2  
Old May 15th, 2002, 05:42 AM
deepspring's Avatar
deepspring deepspring is offline
Is a Psycho
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: In your computer
Posts: 231 deepspring User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via AIM to deepspring Send a message via Yahoo to deepspring
I am pretty sure that PHP includes functions simular to that used in perl, located in PHP's PEAR... only way to know is to have a look on the PHP.net / Zend websites.

Some info that might help...

Shell Scripting with PHP:
http://www.phpbuilder.com/columns/darrell20000319.php3

PEAR:
http://pear.php.net/package-search....D&submit=Search

Some scripts that have already been done:
http://www.hotscripts.com/PHP/Scrip...Search_Engines/

If you fail you there is always PERL:
http://www.devshed.com/Server_Side/...ning/page1.html

But I don't think ya will...
__________________
deepspring

- "Netscape 4 users are like lemmings... You can't help but laugh when one falls off a cliff"

Last edited by deepspring : May 15th, 2002 at 05:50 AM.

Reply With Quote
  #3  
Old May 15th, 2002, 06:06 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
Compile php as a binary and cron like this:

* * * * * * myPhpScript.php

First line would be:

#! /path/to/php.exe -q
__________________
FSBO (For Sale By Owner) Realty

Reply With Quote
  #4  
Old May 16th, 2002, 02:52 AM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Thanks for the response's, much appreciated.

Ron, do you know if it's possible to check the install type of PHP be it binary or module?

Cheers

Reply With Quote
  #5  
Old May 16th, 2002, 06:57 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
If php.exe is on the system (usually in /usr/local/bin/ ) then a binary has been installed. There's not an easy way to check, even with phpinfo(), since a module and an executable could both be installed. You could use phpinfo() but that would just tell you if the web server is using a module or exe, not whether or not the exe existed.

Reply With Quote
  #6  
Old May 16th, 2002, 07:22 AM
SilkySmooth's Avatar
SilkySmooth SilkySmooth is offline
Newbie :P
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2001
Location: In the PHP Engine :-)
Posts: 2,880 SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level)SilkySmooth User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 32 m 23 sec
Reputation Power: 15
Well I suppose I can run a check to see if php.exe is present (If my script has access) and if so do some stuff otherwise I won`t include this option.

Thanks for the help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > Cron Reasearch


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway