Menachos11: 3
חֲבִתֵּי כֹהֵן גָּדוֹל, לִישָׁתָן וַעֲרִיכָתָן וַאֲפִיָּתָן בִּפְנִים; וְדוֹחוֹת אֶת הַשַּׁבָּת. טִחוּנָן וְהֶרְקֵדָן אֵינָן דּוֹחוֹת אֶת הַשַּׁבָּת. כְּלָל אָמַר רַבִּי עֲקִיבָא: כָּל מְלָאכָה שֶׁאֶפְשָׁר לָהּ לֵעָשׂוֹת מֵעֶרֶב שַׁבָּת, אֵינָהּ דּוֹחָה אֶת הַשַּׁבָּת; וְשֶׁאִי אֶפְשָׁר לָהּ לֵעָשׂוֹת מֵעֶרֶב שַׁבָּת, דּוֹחָה אֶת הַשַּׁבָּת.
The chavitin of the Kohen Gadol are kneaded, shaped, and baked within [the Courtyard]; and they override the Sabbath. Their grinding and sifting do not override the Sabbath. R’ Akiva stated a rule: Any labor which can be done prior to the Sabbath does not override the Sabbath; whereas one which cannot be done prior to the Sabbath overrides the Sabbath.