Free2Code
 
Time: 2008-11-21, 01:59am
Web base cron jobs, help please
Subject: Web base cron jobs, help please  ·  Posted: 2007-02-05, 04:22am
Rank: ? (60)
Member #: 22843
Where can i place the file for the cron job machine to execute?

i`m using a share hosting server where i have to login to my cpanel, i place a file at /public_html/filename.php and i type the file address like * * * * * /public_html/filename.php but the cron sent me a mail that no such file or directory found.

 
  Reply to this ·  Post link ·  Top
Subject: Re: Web base cron jobs, help please  ·  Posted: 2007-02-05, 08:48am
Rank: ? (767)
Member #: 11085
/public_html/filename.php is relative to the server, so my guess would be that the cron dameon does not view / as the server root. Try ./public_html/file.php.

- relpats_eht
 
  Reply to this ·  Post link ·  Top
Subject: Re: Web base cron jobs, help please  ·  Posted: 2007-02-06, 03:22am
Rank: ? (4821)
Member #: 3416
~/public_html/filename.php also has a shot at working if starting with a dot doesn't do it.

i've always had to set up my cron jobs with something like /usr/bin/php -f /full/path/to/script.php though, but i think you can do it by giving a php file execute permissions and putting where to find php at the top of the file.

also, with everything set to stars that's going to run every minute -- do you really need it that often?

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons