The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I'd be really greatful if anyone could advise me on a cron job I have set up. I believe that the 'job' are not working as I wish and would therefore like any input.

The Cron Job simple calls a php page, which is plain html with with various php scripts called by include();. The php scripts check the modified time of various flat files, and if they are out of date it fetches new data and overwrites the old files (if 'indate' the flat files are just included().

I wish to have a cron job running so that the files are never out of date - to prevent the slow loading due to fetching new data.

Basically what I want is to replicate a user calling this page ever hour. So after reading on the board I set up the cron job:
php /home/username/public_html/folder1/folder2/file.php > /dev/null

However, for some reason I don't think that I am getting the desired effect - ie new data being fetched and old data over written.

So either the page is not being called by Cron, or Cron is not replicating what would occur if a user called the page.

I wrote to HostRocket to ask them if the Jobs were being executed, who advised the the logs showed that they where. However they also advised :

"I would suggest using /usr/bin/php instead of just php, so the server knows the exact location."

So my two Questions are:

Why use /usr/bin/php when the full path has been specified ?

In my case should Cron be replicating a user calling my page - could it be that Cron is binning the output rather than writing it to a file?

If I understand you correct, your problem is that your cron job has no effect. If so, welcome to the club, I have the same problem since some weeks. You can have a look at this thread here, maybe it will help you.http://www.sitepointforums.com/showt...highlight=cron