Hi guys! I've done a simple script to backup some important files to a server. I want this script to run when i shutdown/logout from my system. Is there any way to do it? Something similar to /etc/rc.d/rc.local but initiates when the system is shutdown / logged out.
I could use cron but im worried i might be using the files when the backup starts

It could cause the files to corrupt.
I'm running Mandrake 10.1.
Thanks.