I don't think your dog will take a pill on its own :huh: -- you'd need to use something like a Greenies pill pocket for the pill, and one of these food dispensers:
http://www.amazon.com/Automatic-Feeder-Recorder-Display-Electronics/dp/B00450DTJA/
Amazon have a variety of timed food dispensers.