Ecclesiastes 8:5 NIV

5 Whoever obeys his command will come to no harm, and the wise heart will know the proper time and procedure.