The paper presents a hybrid genetic algorithm for efficient task mapping in wireless sensor networks (WSNs) under macro-programming frameworks, focusing on minimizing energy consumption, routing delay, and ensuring soft real-time requirements. It discusses the mapping of tasks onto sensor nodes through a task graph and introduces a method for configuring the optimization process based on user needs. Simulation results illustrate the trade-offs between energy consumption and delivery delay, offering insights into optimizing WSN applications.