Register
It is currently Wed Apr 23, 2014 8:48 pm

sleep in while loop?


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed Jan 30, 2013 9:33 am   

Joined: Wed Jan 16, 2013 5:40 pm
Posts: 4
I want to set up a loop that tests if the index.html of my website is older than access.log which will trigger a script to rewrite index.html so that the site appears to change each time you access it.

My question is, should i put a 'sleep 10' or something in there? is there a reason not to just let it run continuously? What would that do to my computer?

Also is there a better way to do this??

Thanks in advance :)


Top
 Profile  
 PostPosted: Fri Feb 01, 2013 8:23 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 224
Location: London - UK
derrend wrote:
Also is there a better way to do this??


Oh my word, yes there is. If you want a page to change you make it a dynamically generated page rather than changing a fixed file. There are several methods, the simplest is to write a cgi script.
Search for "cgi script how to" on google.

DW


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP