that provides tools for
doing this with perl. You can find it at CPAN.
As to getting it to run automatically, you will probably end
up calling it from some sort of cron job (assuming you are on
a Unix box) If it is something really simple you could do
it with a shell script also (also called via cron )