"And Othniel ben Kenaz captured it" (Judges 1:13). This is what Scripture says: "And the sun rises and the sun sets" (Ecclesiastes 1:5). Said Rabbi Abba bar Kahana: do we not know that the sun rises and the sun sets? Rather, before the Holy One, blessed be He, causes the sun of one righteous person to set, He causes the sun of another righteous person to rise. The day Rabbi Akiva died, Rabbi was born, and they applied to him, "And the sun rises" and so forth. The day Rabbi Avin died, Rabbi Avin his son was born, and they applied to him, "And the sun rises" and so forth. The day Rabbi Oshaya the man of Tiria died, Rabbi Oshaya his son was born, and they applied to him, "And the sun rises and the sun sets." Before the sun of Eli set, the sun of Samuel rose, as it says, "and the lamp of God had not yet gone out, and Samuel was lying down" and so forth (1 Samuel 3:3). Said Rabbi Yochanan, like that perfect calf (Genesis 15:9): before the sun of Sarah set, the sun of Rebekah rose. Before the sun of Moses set, the sun of Joshua rose. Before the sun of Joshua set, the sun of Othniel ben Kenaz rose, as it says, "And Othniel ben Kenaz captured it."
The Sun of One Righteous Rises Before Another Sets
Yalkut Shimoni on Nach 26:1
וילכדה עתניאל בן קנז (שופטים א, יג). זה שאמר הכתוב וזרח השמש ובא השמש, א"ר אבא בר כהנא אין אנו יודעים שזרח השמש ובא השמש אלא קודם שהשקיע הקב"ה שמשו של צדיק זה הוא מזריח שמשו של צדיק זה. יום שמת רבי עקיבא נולד רבי וקראו עליו וזרח השמש וגו' כו'. יום שמת ר' אבין נולד ר' אבין בריה וקראו עליו וזרח השמש וגו' כו'. יום שמת רבי אשעיה איש טריא נולד ר' אושעיה בריה וקראו עליו וזרח השמש ובא השמש. עד שלא השקיע שמשו של עלי זרחה שמשו של שמואל שנאמר ונר אלהים טרם יכבה ושמואל שוכב וגו', א"ר יוחנן כהדא עגלתא תמימתא עד שלא שקעה שמשה של שרה זרחה שמשה של רבקה. עד שלא שקעה שמשו של משה זרחה שמשו של ייהושע. עד שלא שקעה שמשו של יהושע זרחה שמשו של עתניאל בן קנז. שנאמר וילכדה עתניאל בן קנז: