LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2005, 03:54 PM   #1
kiltannen
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
Question How do I automate saving a page on my site every day?


First off - I apologise if I haven't chosen the right forum to post this in - if it is in the wrong place could a MOD please shift it to where it needs to be...

I have a particular PHP script on my site which is VERY CPU intensive - I would like to save a copy of this file to html once or twice a day. With the plan of pointing my users to that rather than the CPU intensive php...

I am very comfortable doing the cron bit's in a job like this - BUT I just don't really know where to start on the webserver bit.

I am hoping somebody has done something like this before - and that it would be fairly straitforward.

I run:
Red-Hat server OS
Apache web-server
php
MySQL
All on a dedicated server...


If more specifics are needed - no problem - but I don't think what I want to do is very version dependant.

BTW - the script takes a bit more than 120secs to run - and while it is running my server pretty much grinds to a halt. modifying the script to be less intensive is pretty much not possible - it needs the large amount of data it is manipulating and the problem is only likely to get worse - not better.

The script is a page in the phpBB forum software - so I really need to essentially call it in a "browser" if possible. The language for the script is php.

I have made a custom portion on this page which displays contribution statistics from my database - in essence the php script performs an SQL query - then intialises a bunch of variables with the result set - hands those variables of to the templating engine of the phpBB software - and serves it up to the browser.

I want to take a "snapshot" twice a day - and serve up a static page...

Hopefully somebody can give me some suggestions. I did do a quick search but didn't manage to come up with anything that I could figure out how to apply...
 
Old 05-30-2005, 04:28 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
First of all.. what is this script in phpbb? Is it the backup your forum script? If so, why not just use mysqldump or any other tool that actually resides on your server to perform backups. Unless this is just a regular page that doesn't require any intervention.. use wget to retrieve the page.
 
Old 05-30-2005, 09:12 PM   #3
kiltannen
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Re: How do I automate saving a page on my site every day?

Quote:
Originally posted by kiltannen I have made a custom portion on this page which displays contribution statistics from my database - in essence the php script performs an SQL query - then intialises a bunch of variables with the result set - hands those variables of to the templating engine of the phpBB software - and serves it up to the browser.
This custom script is NOT to do a backup - I already do a mySQLDump through CRON 4 times a day for that important function...

trickykid - You ROCK!

This utility is EXACTLY what I wanted!.

THANK YOU.

The power of community - you have truly answered my need...

Last edited by kiltannen; 05-30-2005 at 09:57 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What applications do you use day to day? alan_h404 General 11 10-16-2005 07:09 AM
Why not use Astaro as a normal day to day desktop?? chutsu Linux - General 1 10-08-2005 11:42 PM
RH & HP4050N PCL - page, pause, page, pause, page andguent Linux - Hardware 0 11-10-2003 08:35 AM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM
Linux saving the day, setting up MS. jschiwal Mandriva 1 08-26-2003 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration