|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Cron Is Not Working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|