This paper presents an optimized scheduling method for Plugged-in Electric Vehicles (PEV) that are connected to a residential smart microgrid. Two modes of operation are studied: grid-tied and islanded mode. A Genetic Algorithm (GA)-based method is utilized to optimize an objective function, which includes the cost of energy production, and guarantees the best possible energy consumption profile. The profit of the PEV owners, which has been ignored in most of the existing strategies, is included in the proposed objective function. Furthermore, in order to make the study more realistic, the grid constraints are taken into consideration in the new strategy. Simulation results are used to validate the effectiveness of the proposed approach.