PDA

View Full Version : I'd ask Chen this but it's waaaaaaaaay beyond HIM...


filburt1
11 Jun 2002, 22:59
I have a demo board that I use to show off vB Lite. Every 12 hours or so, how can I have the board automatically reset itself? I mean:

1. Empty the entire db
2. Import the original, fresh install db from a .sql file

?

Mark Hensler
12 Jun 2002, 03:55
I doubt it's beyond Chen.

Have a cron job fire off a shell script. Something like this...


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Chen
12 Jun 2002, 06:11
Or if you have root access, DROP DATABASE, CREATE DATABASE and load the file. :)

(umm, there IS a problem with [code]... argh)

Mark Hensler
12 Jun 2002, 21:38
Ya, looks like its calling nl2br twice.

filburt1
12 Jun 2002, 22:33
Coolness...since this is running on my own system I can just schedule a batch file to be run every 12 hours or something?

XyuRi
13 Jun 2002, 01:47
Originally posted by filburt1
Coolness...since this is running on my own system I can just schedule a batch file to be run every 12 hours or something? that'd probably be the best option (thats probably yhr aproach I'd take)

filburt1
14 Jun 2002, 01:34
This little batch file doesn't work:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Output:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Mark Hensler
14 Jun 2002, 05:42
I think I gave you the wrong syntax... sorry

mysql -uUser -pPassword -e "DELETE FROM table_name" database_name

Chen
14 Jun 2002, 09:25
Or just put EVERYTHING in the vblite.sql file...
Start it with:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Then proceed with the DELETE FROM queries, and then the import queries.