Automatic connect/disconnect VPN connection

Hi everybody,

Everything is summarized in the subject but I explain it:
I make a VPN connection between my home (with a RB951G-2HnD) and my parent’s home (with a openvpn server) but I do not need it permanently (only on-demand). Is it possible to automatically trigger connect and disconnect after a period of inactivity?

Thx