The market demand has changed in recent years due to increased interest in more customized and diversified products by the consumers, leading to a change in production lines, which are becoming more flexible and dynamic. At the same time, the amount of data available in the factories is growing more and more, thereby the number of errors in the production schedule may occur often. Several approaches have been used over time to plan and schedule the shop-floor production. However, some only consider static environments, where the tasks are allocated to the machines, not considering that machines may not be available and sometimes maintenance interventions are needed. The introduction of maintenance increases the scheduling complexity and makes it harder to allocate the tasks efficiently. So, new solutions have been proposed, giving manufacturing systems the ability to quickly adapt to some disturbances that may occur. Thus, Artificial Intelligence approaches have been adopted to do the task allocation for the shop-floor. Those approaches can find suitable solutions faster than traditional approaches. This article proposes an architecture, based on Genetic Algorithm, capable of generating schedules including both production and maintenance tasks.