Joshua 1:6-9 [NIV]Be strong and courageous, because you will lead these people to inherit the land I swore to their forefathers to give them. Be strong and very courageous. Be careful to obey all the law my servant Moses gave you; do not turn from it to the right or to the left, that you may be successful wherever you go. Do not let this Book of the Law depart from your mouth; meditate on it day and night, so that you may be careful to do everything written in it. Then you will be prosperous and successful. Have I not commanded you? Be strong and courageous. Do not be terrified; do not be discouraged, for the LORD your God will be with you wherever you go.
The leader of God's people, in this case Joshua, was to be diligent in the application of his mind to God's law so that, in the tasks and duties set him by God, he might be successful. As with the leader so with the people:
Deuteronomy 6:5-7 You shall love the LORD your God with all your heart, with all your soul, and with all your strength. And these words which I command you today shall be in your heart. You shall teach them diligently to your children, and shall talk of them when you sit in your house, when you walk by the way, when you lie down, and when you rise up.
The phrase "day and night" may well have its counterpart in the morning and evening sacrifices under the law. That is, Joshua, and by extension we, are being encouraged to begin and end our day by serious meditation on God's word and to have it in our minds and in our conversation constantly.
Psalm 1:1-3Blessed is the man Who walks not in the counsel of the ungodly, nor stands in the path of sinners, nor sits in the seat of the scornful; but his delight is in the law of the LORD, and in His law he meditates day and night. He shall be like a tree planted by the rivers of water, that brings forth its fruit in its season, whose leaf also shall not wither; And whatever he does shall prosper.
Close attention to and meditation upon God's word daily and systematically brings us ever closer to Him and allows us to be directed by Him. Fear and worry are, if not eliminated totally due to our weakness, are greatly diminished as we walk according to God's will and not our own.
Proverbs 3:5,6 Trust in the LORD with all your heart, And lean not on your own understanding; In all your ways acknowledge Him, And He shall direct your paths.
I hope you have found this helpful.