Ecclesiastes 8:5

New American Standard Bible (NASB)
He who keeps a royal command experiences no [f]trouble, for a wise heart knows the proper time and procedure.

Read Ecclesiastes 8:5 in other translations