create a cron job of php script using webmin

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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

Re: create a cron job of php script using webmin

On Thu, 11 Aug 2005 02:19:50 -0700, volantecho wrote:

Quoted text here. Click to load it

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!


Re: create a cron job of php script using webmin

Hi Steve,

First thanks for your response! I solved the prob :)
I havent put the full path of my php command, that caused the problem

i failed to make my cron job run when i write the command like this:
php -q /home/lain/public_html/cronjob.php

but this work!!
usr/bin/php -q /home/lain/public_html/cronjob.php

never thought to add the 'usr/bin' at front while on my another server
i'd never add them, but they works :D

Thanks again, Steve :)

Site Timeline