Source · the work in full

Rashi on the Prophets and Writings

CC BY · The Judaica Press Complete Tanach, trans. A. J. Rosenberg
Chapter 3

Ecclesiastes 3

Everything has an appointed season Let not the gatherer of wealth from vanity rejoice, for even though it is in his hand now, the righteous will yet inherit it; only the time has not yet arrived, for everything has an appointed season when it will be.
for every matter Heb. חֵפֶץ, for every thing. All things are called חֲפָצִים in the language of the Mishnah.

A time to give birth at nine months.
and a time to die the limit of the years of every generation.
a time to plant a nation and a kingdom.
and a time to uproot A time will come for it to be uprooted.

A time to kill an entire nation, when the day of its visitation arrives, as it is said (Isa. 14:30): “and he shall slay your remnant with the sword (sic).”
and a time to heal their ruin, as it is written concerning Egypt (ibid. 19:22): “and they shall return to the Lord, and He shall accept their prayer and heal them.”
a time to break the wall of the city, when it is decreed upon it, as it is said (Neh. 1: 3): “and the wall of Jerusalem is breached.”
and a time to build as it is said (Amos 9:11): “and build it up as in the days of yore.”

A time to weep on the ninth of Av.
and a time to laugh in the future, as it is said (Ps. 126:2): “Then our mouths will be filled with laughter.”
a time of wailing in the days of mourning.
and a time of dancing with bridegrooms and brides.

A time to cast stones The youths of Israel scattered during the destruction of the Temple: (Lam. 4: 1): “The holy stones are scattered.”
and a time to gather them from the exile, as it is written (Zech. 9: 16): “And the Lord God (sic) shall save them on that day like the flocks of his people, for crown stones are exalted on His land.”
a time to embrace (Jer. 13:11): “For, just as a girdle clings etc.”
and a time to refrain from embracing (Isa. 6:12): “And the Lord removes the people far away.”

A time to seek As it is stated (Ezek. 34:16): “I will seek the lost,” concerning those of Israel gone astray.
and a time to lose and a time when He lost them in exile, as it is said (Lev. 26:38): “And you will become lost among the nations.”
a time to keep (Num. 6:24): “May the Lord bless you and keep you,” when you do His will.
and a time to cast away (Deut. 29:27): “and cast them into another land.”

A time to rend the kingdom of the House of David, as it is said (I Kings 14:8): “And I tore the kingdom, etc.”
and a time to sew (Ezek. 37:17): “and they shall be one in your hand”; (ibid. verse 22): “neither shall they any longer be divided into two kingdoms.”
a time to be silent Sometimes a person is silent and receives a reward, as it is said (Lev. 10:3): “and Aaron was silent,” and he merited that the Divine speech be especially addressed to him, as it is said (ibid. verse 8): “And the Lord spoke to Aaron: Drink neither wine nor strong drink.”
and a time to speak (Exod. 15:1): “Then Moses... sang”; (Jud. 5:1): “Now Deborah...sang”; (Hos. 14:3): “Take words with you.”

A time to love (Deut. 7:13): “and He will love you.”
and a time to hate (Hos. 9:15): “All their evil is in Gilgal; therefore (sic) I hated them.”

What profit has the one who works What is the profit of the one who does evil in all that he toils? He too—his time will come, and all will be lost.

the occupation Heb. הָעִנְיָן, the behavior.
to occupy themselves Heb. לַעֲנוֹת, to behave.

everything beautiful in its time At the time of good, it is beautiful that the reward be given for good deeds, and at the time of evil, it is fitting for the recompense for evil deeds.
also the world He put in their hearts, etc. Also the wisdom of the world that He put into the hearts of the creatures—He did not put it all into the heart of everyone, but [He gave] a little to this one and a little to that one, in order that man should not comprehend the entire deed of the Holy One, blessed be He, to know it; and he will not know the day of his visitation [i.e., the day of his death] and on what he will stumble, in order that he put his heart to repent, so that he will be concerned and say, “Today or tomorrow I will die.” Therefore, הָעֹלָם is written here defectively, an expression of concealment (הַעֲלָמָה), for if man would know that the day of his death was near, he would neither build a house nor plant a vineyard. Therefore, he says that He made everything beautiful in its time. The fact that there is a time for death is a beautiful thing, for a person relies and says, “Perhaps the time of my death is far off,” and he builds a house and plants a vineyard, and it is [therefore] beautiful that it is concealed from people.

I knew now, since the time of visitation is concealed, that there is no [other] good for man but to rejoice with his portion and to do that which is good in the sight of his Creator, as long as he lives.

and enjoys what is good The Torah and the commandments.

I knew that everything that God made [i.e.,] that the Holy One, blessed be He, [made] in the Creation, is fit to exist forever, and it cannot be changed, either by adding or by diminishing, and when it is changed, God commanded and caused it to be changed, in order that they should fear Him. The ocean broke through its boundary in the generation of Enosh and inundated a third of the world, and God did this so that they would fear Him. For seven days, the course of the sun was changed in the Generation of the Flood, to rise in the west and set in the east, in order that they fear Him. The sun went back ten steps in the days of Hezekiah, and in the days of Ahaz his father, the day was shortened and the night was lengthened on the day of his death, so that he should not be eulogized. All this was so that they would fear Him. Therefore, there is nothing better for a man to occupy himself with than with His commandments and to fear Him.

That which was is already That which was before us, was already done, and we saw it or heard it from others who saw it, and we can attest to it, for we saw that the Holy One, blessed be He, seeks the pursued. Jacob was pursued, [and] Esau was a pursuer, (Mal. 1:2f): “And I loved Jacob. And I hated Esau.” The Egyptians pursued Israel. The Egyptians drowned in the sea, and Israel went forth with a high hand.
and that which is destined to be at the end is a model of what already was. As it was in the beginning, so will it be at the end. The Holy One, blessed be He, does not change His standards in the world.
and God seeks the pursued to punish the pursuer. Therefore, what is the profit of one who does evil in what he toils? He is destined to he called to account.

the place of justice, etc. I saw with the holy spirit the place of the Chamber of Hewn Stone in Jerusalem, which was (Isa. 1:21): “full of justice”; there they will judge wickedly, as it is said (Micah 3:11): “Its heads judge for bribes,” and I saw their punishment.
and the place of righteousness the middle gate, which was the place of deciding the laws.
there is wickedness there sat Sarsachim, Rab- Saris, Nergal-Sarezer, Rab-Mag (Jer. 39:3), and Nebuchadnezzar and his hosts, and they judged Israel with harsh tortures and death sentences.
there is wickedness Heb. הָרָשַׁע. The accent mark is before the last syllable, indicating that it is a noun like הָרֶשַּׁע, but since it is the end of the verse, it is changed to be vowelized with a “kamatz,” although we do not find another instance of this word that changes in the case of an ethnachta or a sof pasuk.

I said to myself, etc. Therefore, I say: The Holy One, blessed be He, judges everyone after a time, and even though the matter is delayed, it will ultimately reach its time, for there is a time for every matter, even for retribution, and there is a time for the visitation of judgment.
and for every deed that man did, they will judge him there when the time of the visitation arrives; there at that time, a time is given for every deed, to be judged for it. [The Rabbis say:] At the gate of the fold there are words (of bargaining), but in the stall (where the sheep are delivered) there is strict accounting (Shab. 32a).

I said to myself when I saw all this.
[that this is] because of the children of men who adopted the trait of haughtiness, to exert rulership and superiority over those smaller than they.
[so that God] should clarify for them The Holy One, blessed be He [judges them], to let them know that their rulership is naught, and to show them and also the princes and the kings.
that they are like beasts to themselves like other cattle and beasts they are to themselves.

For the happening of the children of men, etc. This is the reason for the matter, that the Holy One, blessed be He, gave a fate and a mishap to the children of men, and there is a fate and a mishap to the beasts, and He gave one fate to them both, for just as this one dies, so does that one die.
and the superiority of man over beast And the superiority and success of man over the beasts is not apparent after he dies, for everything is converted to become vanity, to return to the dust.

Who knows Like (Joel 2:14): “Whoever knows shall repent.” Who is it who understands and puts his heart to [the fact] that the spirit of the children of men ascends above and stands in judgment, and the spirit of the beast descends below to the earth, and does not have to give an accounting. Therefore, one must not behave like a beast, which does not care about its deeds.

And I saw in all of these.
that there is nothing better for man.
than that man rejoice in his deeds in the toil of his hands he should rejoice and eat, but not to widen his desire like the grave, to covet riches, to accumulate that which is not his.
for that is his portion The toil of his hands—that is his portion given him from Heaven, and with it he will rejoice.
for who will bring him to see after he dies, what his sons will have; if they too will prosper with the riches that he gathered and left over for them or whether they will not prosper.

You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.