Real countdown timer using smart plug

I would like to create widget on my phone that let me turn smart plug on for certain time only.
So basically I am planning to charge my cordless vacuum only for 3hrs and no more, not daily, just whenever I wish. This will prevent overcharge my vacuum battery.
Sorry for my English.
Is it possible?