Using switch to control a servo trough exec binding

Hi there,
first of all, Sorry for my bad english and I’m very new and still experimenting with openHAB.

What I was trying to do was to dispense pet food using switch that will eventually control the servo.
Right now on my sitemap I has

sitemap demo label="Home"
{	Frame label="Dispense food"
	{ Switch item=food}

And on my items I has

Switch  food "Dispenser"
{exec="<[/usr/bin/python /opt/openhab/configurations/scripts/*?))]"}

And the servo seems to be functional, but not when I toggle the switch, but rather using the time i defined.

If anyone has any idea how to fix this issue?

are you using esp8266 to control servo?