This paper presents the application of a task scheduling algorithm called Fan on an artificial intelligence technique as genetic algorithms for the problem of finding minima in objective functions, where the equations are predefined to measure the return on an investment. This work combines the methodologies of exploration and exploitation of a population, obtaining results with good aptitudes until finding a better learning based on conditions of not ending until an individual delivers a better aptitude, complying with the established restrictions, exhausting all possible options and fulfilling a stop condition. A real-time task planning algorithm was applied based on consensus techniques. A software tool was developed, and the scheduler called FAN was adapted that contemplates the execution of periodic, aperiodic, and sporadic tasks focused on controlled environments, considering that strict time restrictions are met. In the first phase of the work, it is shown how convergence precipitates to an evolution, this is done in few iterations. In a second stage, exploitation was improved, giving the algorithm a better performance in convergence and feasibility. As a result, there is the exploitation of the population and applying iterations with the fan algorithm and better aptitudes were obtained that occur through asynchronized processes under real-time planning concurrently.