Depends on the controller, can't help much without that information. Maybe connect to the coolant pump, spindle relay, some other realy that changes state at the end of the job? Maybe the controller has an output for a tower light, a relay that you can access and program with an M code?