I have been trying to run a php script in the cronjob settings in my cpanel but failed.
I'm confused with the command line, can any one help with that please?
What script are you running? We can better answer your question if we knew.
Your cron job should look something like this.
php -q /home/CPANEL-USER/public_html/SCRIPT-DIRECTORY/cron.php
However, we can't say for sure as your script could require a special way of cron being called.
its a php script, a with a mail function in it...will send emails when users register!
Today I Just Found One Best Link for Cron Job May be its help you
cPanel should provide you with enough prompts to get the timing correct.
the command to issue will be what Lawrence posted. php -q <filepath>
the filepath you can discover by echoing $SERVER['SCRIPTFILENAME']
is this one alright, thats what it looks like in Cpanel>
But doesn't work, manually running the script does!
Please check the image attachment above, thats what my script looks like in Cpanel, please verify if its alright...
Please see above!!
@xem I don't have more knowledge on Cron Job.......... I am born baby on this matter :x
Upload your script, go to cpanel / cron and add as follows..
lynx -dump http://www.domain.com/script.php
This drops me an email to say that its done and I have One set to run everynight at midnight and one on the 1st and 15th of every month.
This topic is now closed. New replies are no longer allowed.