When Christ prayed this prayer to God, it was to acknowledge His purpose and the fulfillment of God's wishes which were to come. But He also prayed a thanksgiving for the Apostles who received His message and were prepared to send it to the rest of the world, a world that would hate them for their love of Jesus.
John 7:1-5