This machine is called “The Most Useless Machine Ever” because all it does when turned on is turn itself back off.
This uses a SPDT switch, a DPDT toggle switch, and a servo modified as a gear motor. When the toggle switch is thrown, the servo moves the finger up. When the finger rises up it lets go of the SPDT switch so that it can power the circuit after the DPDT switch is shut off. The finger then switches the top switch, which reverses the servo. Then the finger goes back inside the box where it hits the SPDT switch and stops. The circuit is now off and waiting for you to flip the switch again.