|
Posted by Steve on 08/11/05 13:45
On Thu, 11 Aug 2005 02:19:50 -0700, volantecho wrote:
> hi,
>
> i m using webmin to create a cron job of a php script. While i click on
> 'run it now', it works, generate the output. However, the php script
> doesnt execute for every minutes which i've set to.
>
> besides the php scripts, i have other scripts run under cron jobs, such
> as perl scripts and log files. I couldnt understand why my php scripts
> doesnt work under cron job.
>
> Is it the webmin or php problem?
>
> Give me some ideas please!! really getting frustrated !! T_T
Cron jobs run with an extremely minimal environment. Practically, this
means that there's no PATH set up, so you either need to add in the
necessary directories in a PATH=... line at the top of your script ( which
also needs #!/bin/bash or equivalent as it's first line ), or all
applications are called using their absolute path. I normally use the
latter, but I really don't know why - it makes scripts a lot more
difficult to port!
Steve
[Back to original message]
|