BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Closed Thread
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 September 20th, 2007, 11:45 PM
PhackedUp PhackedUp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 146 PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 22 h 17 m 52 sec
Reputation Power: 4
Send a message via AIM to PhackedUp Send a message via MSN to PhackedUp
Cron Is Not Working

I have a complex PHP script which downloads a variable number of files.

When i schedule the Cron Job (via Cron through Webmin), the job does not sucessfully download any files (or do anything useful as far as I can tell, when the system runs it automatically.) The download portion of the script is actually a seperate program call by the master program. I structured this way so that I can create forked processes.

However, If I manually run the cron job it works fine. NOTE - I AM MAKING ZERO CHANGES TO THE PROGRAM. The Cron is scheduled to run the job as root.

SO I AM OUT OF IDEAS.

Lots of points for this one - especially if I can walk away from this not feeling stupid.

Last edited by PhackedUp : September 21st, 2007 at 12:09 AM.

Reply With Quote
  #2  
Old September 21st, 2007, 12:30 AM
PhackedUp PhackedUp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 146 PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level)PhackedUp User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 22 h 17 m 52 sec
Reputation Power: 4
Send a message via AIM to PhackedUp Send a message via MSN to PhackedUp
I shall award myself points for this.

AS AN FYI when you run a cron job as root, depending on how your shell works (ie it may be different to the env cron runs in), you may need to use the full path.....

for instance normally "php my_executable.php" works at my command line,...however cron requires
"/usr/local/bin/php my_executable.php"

As result the problem was thatthe "my_executable.php" script had an exec("php download_stuff.php $input $output");

command,...which apparently cron needs the full path to the executable.

Note that php .... works even when I am not in the directoy of the executable which means its not as simple as locale.

Anyway I hope this saves someone lots of gray hairs.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Cron Is Not Working


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 5 hosted by Hostway