A toggle switch to call a function and then turn off the Arduino

There are plenty of cases where you want a machine to perform certain tasks and then turn itself off: a coffee maker, an oven, a washer, etc.