i made exactly what you described, but i launch the two scripts (one for off and one for on) via the crontab.

Go again trough the MM install description for the pi and check all settings again.
i made a error and put one line in the wrong place and had similar problems like you. Since i double checked it, everything is fine