Not sure how to achieve your description problem but for the category pages you could do something like this in a cron, obviously correcting the url for getting the category pages.
eg.
0 * * * * lwp-download
http://domain.com/mysql/cat1? gal1.cgi /home/user/domain/categoryname.html
* above should all be on one line
that would output the specified category to a html file every hour.