Daniel 9:24-27 is a monumental passage, emblematic of God's sovereignty over human events. It provides the chronological skeletal system of Biblical prophecy, recording Gabriel's revelation to Daniel in around 516 B.C., of a 490-year timeline for Israel's future: "for Jerusalem, to make an end of sin, to make atonement for iniquity, to bring in everlasting righteousness, to seal up vision and prophecy, and to anoint the most holy" (9:24). The clock begins its countdown with "a decree to restore and rebuild Jerusalem" (9:25).
The certainty of the timeline is non-negotiable and inalterable. The seventy sevens had been decreed or determined, as the Hebrew term nichetaka (decreed, determined) is in the niphal perfect, which typically indicates a passive (niphal) and completed (perfect) action. The timeline had already been determined. Daniel would be able to "know and discern" (9:25a) the timing from a particular point in history—a decree to restore and rebuild Jerusalem.
When we examine the Biblical literature, we find only one decree regarding the rebuilding of the temple. There was a decree to rebuild the temple (Ezra 1:1-4,5:17), but that did not match Gabriel's description of the decree to rebuild the city itself. For the decree matching the Daniel 9 description, we look to Nehemiah 2.
When we are first introduced to Nehemiah, we find him praying in a similar fashion to Daniel's prayer. Nehemiah weeps for his people and his city (Neh 1:4), acknowledges the faithfulness of God in keeping His word (Neh 1:5), confesses not only the sin of his people, but also his own sin and that of his father's house (Neh 1:6-7), and he appeals to God to remember His word and the promises He made to Israel (Neh 1:8-11).
After recording the prayer, Nehemiah makes a point to tell the readers that he was cupbearer to the king (Neh 1:11). This is significant, for his readers would understand that he had a high degree of responsibility, not only in being the official taste-tester to protect the king from danger, but also as an administrator, possibly keeping the signet and in charge of high levels of administration, as in the apocryphal reference to Ahiqar of the Assyrian court. 
Josephus records that Nehemiah was outside the palace at a gate inquiring of the welfare of Jews who had returned to Jerusalem, was told that they were being overrun, and that there were even corpses in the roads. While Nehemiah was grieving there at the gate, he was told that the king was about to dine. Nehemiah hurried back, "as he was, without even washing" to serve the king. 
If Josephus' account reflects accurately, it is no wonder that Nehemiah was afraid (Neh 2:1-2), as he had not been troubled before the king before, nor was it likely he had previously appeared so unready to dispense with his duty. Nehemiah's fear, then, was justified, as his life was at stake. When asked why he appeared so troubled, Nehemiah offered no apology, but respectfully recounted how the city of Jerusalem remained in ruins (Neh 2:3). The king responded favorably, inviting Nehemiah to make a request. Before he responded to the king, Nehemiah prayed (Neh 2:4). Nehemiah then requested of the king that he be allowed to return to Jerusalem and rebuild the city (Neh 2:5). The king granted his request and sent with Nehemiah royal letters confirming his decree that Nehemiah was to rebuild the city. Nehemiah recognized that the king's cooperation was attributed to God's favor (Neh 2:8).
Without Nehemiah's prayerful response to the king and his passion for Jerusalem it seems this decree doesn't happen, yet the timeline itself had already been decreed long before Nehemiah. In this episode Nehemiah demonstrated patriotism, courage, humility, and above all dependence on his Lord. As a result of Nehemiah's response, King Artaxerxes' decree of 445-444 B.C. would quietly yet significantly set in motion the Daniel 9 timeline. God had already decreed the timeline, and at the same time he uses and responds to Nehemiah. In this case it is evident that God is both completely sovereign, and that humanity bears responsibility for and shares at least some degree of involvement in the unfolding of God's plan.
"Whether for correction, or for His world, or for lovingkindness, He causes it to happen" (Job 37:13).