A cron job will do the job very well and in a flexible way, but FYI there might be even a simpler solution without cron. When the battery is getting low, ACPI should generate an "event" which you should be able to catch fairly easily. I'm not sure how to associate your own scripts to those events, I think you can set it up somehow in /etc/acpi (would need a bit of googling around...)