Page 1 of 1

help in cron jobs

Posted: Sat Jun 28, 2008 1:41 am
by rej2k7
hello,

i am having problems using cron jobs

from a linux server

my requirement is to execure a php file which is in ther server

i used with the syntaxes

/dev/usr/bin/php/www.xxxxx.com/sendmail2.php

and not working please correct me

Help is required ..

thanks

Re: help in cron jobs

Posted: Sat Jun 28, 2008 10:12 pm
by Ollie Saunders
You have to make the script executable

Code: Select all

$ chmod +x /dev/usr/bin/php/www.xxxxx.com/sendmail2.php
and put

Code: Select all

#!/usr/bin/env php
at the top. Test it by running

Code: Select all

$ /dev/usr/bin/php/www.xxxxx.com/sendmail2.php
in the shell, it should execute.