Is there a program to charge/discharge the battery automatically without the need to unplug the ac adapter everytime?

view story

http://askubuntu.com – I want to give some life to my old laptop, and recalibrate the battery (old now). When reading around on forums, the common info is to turn on the PC, drain the batt, even from Bios, and then recharge batt without having the PC on, and repeat cycle until satisfied. I hope there is a way to soft up this via ACPI without the need to actually let the PC die out of misery. I was hoping for a program that when running, shall unlink the actual AC power source from the Battery charging mechanism. So when program is running, even if the laptop is plugged, it shall use the power from Battery until ful (HowTos)