Vehicular fog computing (VFC) is a promising solution in addressing various applications in intelligent transportation systems. Computational resources of both parking and moving vehicles can be used for computation-intensive tasks. This paper proposes a straightforward heuristic method in two forms for resource allocation and task scheduling problem in a cloud-fog environment, based on the idea of VFC. First, tasks requesting maximum resources are scheduled to static fog nodes which have more computational resources. Dynamic fog nodes are assigned to tasks while there are no available static fog nodes. Static fog nodes refers to stationary servers, while and dynamic fog nodes refer to parked or moving vehicles, respectively. Moreover, static fog nodes show greater priority in comparison to dynamic fog nodes. This method is evaluated by stochastic data and measures makespan, cost, and wait time. Experimental results show the achievement of the proposed method in reducing both makespan and wait time.