This bit of wisdom has been said many times, many ways. Here are some of the expressions that I have come across.
Pierre Corneille, Horace (1639), Act II, Scene viii:
Faites votre devoir et laisser-faire aux dieux. (Do your duty, and leave the rest to heaven.)
Matthew Henry, Commentary on Ps. 37.5-6 [Commit thy way unto the LORD; trust also in him; and he shall bring it to pass. And he shall bring forth thy righteousness as the light, and thy judgment as the noonday.]:
We must do our duty (that must be our care) and then leave the event with God.
Richard Cecil:
Duties are ours; events are God's. This removes an infinite burden from the shoulders of a miserable, tempted, dying creature. On this consideration only, can he securely lay down his head, and close his eyes.
John Quincy Adams:
Duty is ours; results are God's.
Gen. T.J. (Stonewall) Jackson:
Duty is ours; consequences are God's.
Walter Savage Landor:
Consult duty, not events.
Gen. George S. Patton, Jr., Diary, November 8, 1943:
If I do my full duty, the rest will take care of itself.
Douglas Bond, Duncan's War (2002), p. 58:
When the Psalm singing ended, his father continued, "Mary, m'love, it's been said that 'Duties are ours; events are God's.'"