Sirach 22:6

Like music in time of mourning is ill-timed conversation, but a thrashing and discipline are at all times wisdom.