help in cron jobs

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
rej2k7
Forum Newbie
Posts: 1
Joined: Sat Jun 28, 2008 1:22 am

help in cron jobs

Post 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
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: help in cron jobs

Post 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.
Post Reply