shutting down clock

I want to set a variable something like @@_clockwork_shutdown which would 'gracefully' exit the infinite loop of ticking.