שֵׁשֶׁת יָמִים הָאֵלּוּ שֶׁאֲסָרָן הַכָּתוּב בַּעֲשִׂיַּת מְלָאכָה שֶׁהֵן רִאשׁוֹן וּשְׁבִיעִי שֶׁל פֶּסַח וְרִאשׁוֹן וּשְׁמִינִי שֶׁל חַג הַסֻּכּוֹת וּבְיוֹם חַג הַשָּׁבוּעוֹת וּבְאֶחָד לַחֹדֶשׁ הַשְּׁבִיעִי הֵן הַנִּקְרָאִין יָמִים טוֹבִים. וּשְׁבִיתַת כֻּלָּן שָׁוָה שֶׁהֵן אֲסוּרִין בְּכָל מְלֶאכֶת עֲבוֹדָה חוּץ מִמְּלָאכָה שֶׁהִיא לְצֹרֶךְ אֲכִילָה שֶׁנֶּאֱמַר (שמות יב טז) "אַךְ אֲשֶׁר יֵאָכֵל לְכָל נֶפֶשׁ" וְגוֹ':
The six days on which the Torah forbade work are the first and seventh days of Pesach, the first and eighth days of the festival of Sukkot, the festival of Shavuot, and the first day of the seventh month. They are referred to as holidays.The [obligation to] rest is the same on all these days; it is forbidden to perform all types of servile labor, with the exception of those labors necessary for [the preparation of] food, as [implied by Exodus 12:16]: "Only that [labor] from which all souls will eat [may you perform]."
בַּיּוֹם֙ הָֽרִאשׁ֔וֹן מִקְרָא־קֹ֖דֶשׁ יִהְיֶ֣ה לָכֶ֑ם כׇּל־מְלֶ֥אכֶת עֲבֹדָ֖ה לֹ֥א תַעֲשֽׂוּ׃
On the first day you shall celebrate a sacred occasion: you shall not work at your occupations.
וּבַיּ֤וֹם הָרִאשׁוֹן֙ מִקְרָא־קֹ֔דֶשׁ וּבַיּוֹם֙ הַשְּׁבִיעִ֔י מִקְרָא־קֹ֖דֶשׁ יִהְיֶ֣ה לָכֶ֑ם כׇּל־מְלָאכָה֙ לֹא־יֵעָשֶׂ֣ה בָהֶ֔ם אַ֚ךְ אֲשֶׁ֣ר יֵאָכֵ֣ל לְכׇל־נֶ֔פֶשׁ ה֥וּא לְבַדּ֖וֹ יֵעָשֶׂ֥ה לָכֶֽם׃
You shall celebrate a sacred occasion on the first day, and a sacred occasion on the seventh day; no work at all shall be done on them; only what every person is to eat, that alone may be prepared for you.
מַאי חֲנוּכָּה? דְּתָנוּ רַבָּנַן: בְּכ״ה בְּכִסְלֵיו יוֹמֵי דַחֲנוּכָּה תְּמָנְיָא אִינּוּן דְּלָא לְמִסְפַּד בְּהוֹן וּדְלָא לְהִתְעַנּוֹת בְּהוֹן. שֶׁכְּשֶׁנִּכְנְסוּ יְוָוֽנִים לַהֵיכָל טִמְּאוּ כׇּל הַשְּׁמָנִים שֶׁבַּהֵיכָל. וּכְשֶׁגָּבְרָה מַלְכוּת בֵּית חַשְׁמוֹנַאי וְנִצְּחוּם, בָּדְקוּ וְלֹא מָצְאוּ אֶלָּא פַּךְ אֶחָד שֶׁל שֶׁמֶן שֶׁהָיָה מוּנָּח בְּחוֹתָמוֹ שֶׁל כֹּהֵן גָּדוֹל, וְלֹא הָיָה בּוֹ אֶלָּא לְהַדְלִיק יוֹם אֶחָד. נַעֲשָׂה בּוֹ נֵס וְהִדְלִיקוּ מִמֶּנּוּ שְׁמוֹנָה יָמִים. לְשָׁנָה אַחֶרֶת קְבָעוּם וַעֲשָׂאוּם יָמִים טוֹבִים בְּהַלֵּל וְהוֹדָאָה.
The Gemara asks: What is Hanukkah, and why are lights kindled on Hanukkah? The Gemara answers: The Sages taught in Megillat Ta’anit: On the twenty-fifth of Kislev, the days of Hanukkah are eight. One may not eulogize on them and one may not fast on them. What is the reason? When the Greeks entered the Sanctuary they defiled all the oils that were in the Sanctuary by touching them. And when the Hasmonean monarchy overcame them and emerged victorious over them, they searched and found only one cruse of oil that was placed with the seal of the High Priest, undisturbed by the Greeks. And there was sufficient oil there to light the candelabrum for only one day. A miracle occurred and they lit the candelabrum from it eight days. The next year the Sages instituted those days and made them holidays with recitation of hallel and special thanksgiving in prayer and blessings.
וּמִפְּנֵי זֶה הִתְקִינוּ חֲכָמִים שֶׁבְּאוֹתוֹ הַדּוֹר שֶׁיִּהְיוּ שְׁמוֹנַת הַיָּמִים הָאֵלּוּ שֶׁתְּחִלָּתָן כ"ה בְּכִסְלֵו יְמֵי שִׂמְחָה וְהַלֵּל וּמַדְלִיקִין בָּהֶן הַנֵּרוֹת בָּעֶרֶב עַל פִּתְחֵי הַבָּתִּים בְּכָל לַיְלָה וְלַיְלָה מִשְּׁמוֹנַת הַלֵּילוֹת לְהַרְאוֹת וּלְגַלּוֹת הַנֵּס. וְיָמִים אֵלּוּ הֵן הַנִּקְרָאִין חֲנֻכָּה וְהֵן אֲסוּרִין בְּהֶסְפֵּד וְתַעֲנִית כִּימֵי הַפּוּרִים. וְהַדְלָקַת הַנֵּרוֹת בָּהֶן מִצְוָה מִדִּבְרֵי סוֹפְרִים כִּקְרִיאַת הַמְּגִלָּה:
Accordingly, the Sages of that generation ordained that these eight days, which begin from the twenty-fifth of Kislev, should be commemorated to be days of happiness and praise [of God]. Candles should be lit in the evening at the entrance to the houses on each and every one of these eight nights to publicize and reveal the miracle.These days are called Chanukah. It is forbidden to eulogize and fast on them, as on the days of Purim. Lighting the candles on these days is a Rabbinic mitzvah, like the reading of the Megillah.
אָמַר רָבָא: פְּשִׁיטָא לִי, נֵר בֵּיתוֹ וְנֵר חֲנוּכָּה — נֵר בֵּיתוֹ עָדִיף, מִשּׁוּם שְׁלוֹם בֵּיתוֹ. נֵר בֵּיתוֹ וְקִידּוּשׁ הַיּוֹם — נֵר בֵּיתוֹ עָדִיף, מִשּׁוּם שְׁלוֹם בֵּיתוֹ. בָּעֵי רָבָא: נֵר חֲנוּכָּה וְקִידּוּשׁ הַיּוֹם מַהוּ? קִידּוּשׁ הַיּוֹם עֲדִיף — דִּתְדִיר, אוֹ דִילְמָא נֵר חֲנוּכָּה עֲדִיף — מִשּׁוּם פַּרְסוֹמֵי נִיסָּא? בָּתַר דְּבַעְיַהּ, הֲדַר פַּשְׁטַהּ: נֵר חֲנוּכָּה עֲדִיף, מִשּׁוּם פַּרְסוֹמֵי נִיסָּא.
Rava said: It is obvious to me that there is a fixed list of priorities. When a person is poor and must choose between purchasing oil to light a Shabbat lamp for his home or purchasing oil to light a Hanukkah lamp, the Shabbat lamp for his home takes precedence. That is due to peace in his home; without the light of that lamp, his family would be sitting and eating their meal in the dark. Similarly, if there is a conflict between acquiring oil to light a lamp for his home and wine for the sanctification [kiddush] of Shabbat day, the lamp for his home takes precedence due to peace in his home. However, Rava raised a dilemma: When the conflict is between oil for a Hanukkah lamp or wine for kiddush of Shabbat day, what is the ruling in that case? Does kiddush of Shabbat day take priority because it is frequent, i.e., it is performed every week, and there is a principle: When there is a conflict between a frequent practice and an infrequent practice, the frequent practice takes precedence? Or, perhaps the Hanukkah lamp takes precedence due to publicity of the miracle? After he raised the dilemma, he then resolved it on his own and he ruled that, in that case, the Hanukkah lamp takes precedence due to publicity of the miracle.
דברים האסורים והמותרים בחנוכה. ובו ג סעיפים: בכ"ה בכסליו (מתחילים) שמונת ימי חנוכה ואסורים בהספד ותענית אבל מותרין בעשיית מלאכה ונוהגות הנשים שלא לעשות מלאכה בעוד שהנרות דולקות ויש מי שאומר שאין להקל להם:
On the 25th of Kislev (start) the eight days of Hanukkah, and they are prohibited for eulogizing and fasting, but are permitted for doing work. The women have made it a custom not to do work while the candles are burning. And there is [an opinion] that says that we may not be lenient for them.