Vehicular Fog Computing (VFC) empowers automotive networks with fog computing, ensuring minimal delays for user services and vehicle operations. This study introduces a novel meta-heuristic algorithm for optimizing task scheduling in Vehicular Fog Computing (VFC). Leveraging Grey Wolf Optimization (GWO), the method differentiates between static and dynamic fog nodes, representing stationary servers and moving vehicles, respectively. Afterwards, a new stage is applied to refine the results of the GWO. The purpose of this step is to identify the fog node with the highest workload and distribute a percentage of its workload to several other fog nodes. This will reduce waiting time and improve makespan. Lastly, resource-intensive tasks are prioritized and allocated to these nodes. The paper includes a thorough evaluation of the GWO-based approach, analyzing the impact of various algorithm parameters. Performance is assessed using both real-world applications and synthetic data.Moreover, our implementation is considered ARM processor as computing resources in dynamic fog node. Experimental results demonstrate that the proposed algorithm achieves lower monetary costs than existing solutions and it shows the improvement at wait and makespan.