Planning and managing the production process are key challenges faced by every manufacturing organization. The main contribution of this article lies in the analysis and design of a planning algorithm that takes into consideration the specifics of this environment. The proposed algorithm encompasses elements of batch production, including a just-in-time approach. The article focuses on scenarios within batch production. Managers of manufacturing and supply companies must ensure smooth fulfillment and uninterrupted production of the agreed-upon quantity of parts. However, this task presents complex challenges. The product portfolio requires meticulous sequencing of production batches, and subsequent parts need to be temporarily stored in their raw state for further processing. Moreover, product variability necessitates frequent adjustments to the production line, resulting in delays. Shortages in manpower additionally place demands on shift organization. The company’s primary objective is to increase production efficiency while simultaneously reducing inventory and minimizing non-standard shift work. The challenge was to reconcile seemingly conflicting company requirements and to concentrate on solutions with swift implementation and minimal costs. Ensuring seamless production operation can be addressed by expanding supporting technologies or by increasing production capacity, such as acquiring an additional production line. However, these options entail costs and do not align with the company’s expectation for immediate impact and cost savings. However, improving production efficiency can also be achieved by altering the approach to production planning, which is the central theme of this article. The key element is ensuring that the customer plan is adhered to while working with a fixed production logic and variable input factors that must account for various non-standard situations.