PDA

View Full Version : Seeking simplest script ever!!!


DemonWolfe
01-28-2001, 12:55 AM
Does anyone have access to (or know enough to write one for me) a VERY simple little script that can do the following:

Using a crontab, update my page each night at midnight.

Thats it... pretty simple eh?


I was thinking it could simply read a preset file structure such as (1-1.html 1-2.html 1-3.html etc) and do a date read, grab the correct .html (based on date read) and then move (copy, rename) that file to the main page file, in this case ttgp.html.

This would allow me to make pages days in advance, and not having to worry about it updating itself each night at midnight. http://bbs.adultwebmasterinfo.com/ubb/smile.gif

This should be a simple script shouldn't it?


Thanks for any help,

John
DemonWolfe

http://www.demonwolfe.com/site/tgp.html

ThaKiller
01-28-2001, 08:00 AM
http://german25.virtualave.net/renamer.zip

you have my icq#, contact me if you experience problems

The Dawg
01-28-2001, 08:22 AM
What you are asking for is a regular cron tab file... no script necessary.

Example:
01 00 * * * cd /path/toyour/docs ; cp update.html index.html

That will overwrite your index.html file with data from update.html @ 12:01AM.

The cp is telling the server to COPY over the index with update.html.

You can have as many lines of cron commands as you want.

Hope that helps ya,

The Dawg

playa
01-28-2001, 09:22 AM
tha killa

can you post some instructions on that script of yours,,,,looks interesting..

ThaKiller
01-28-2001, 09:40 AM
what it does is very simple (as requested http://bbs.adultwebmasterinfo.com/ubb/wink.gif :
* getting the server date
* renaming the html file for the current date (eg. 28012001.html, 29012001.html and so on) to a file of your choice

you will have to run it with crontab every day midnight..

you have to enter the relative unix root path and the "target" filename, in this example index.html and there you go

DemonWolfe
01-29-2001, 02:00 PM
ThaKiller,

YOU ARE THE MAN!!

(Sorry, thought that deserved all caps)

I just DL'ed it, and I will check it out tonight!

Thanks a shitload,

John
DemonWolfe

ThaKiller
01-30-2001, 03:10 AM
did it work Demonwolfe?! http://bbs.adultwebmasterinfo.com/ubb/biggrin.gif

Due
01-30-2001, 03:49 AM
What you need is a better TGP script http://bbs.adultwebmasterinfo.com/ubb/smile.gif
I asume it is for your TGP?
You should contact me on ICQ http://bbs.adultwebmasterinfo.com/ubb/wink.gif
/Due
ICQ # 7694991