Network Function Virtualization (NFV) emerges as a promising technology to increase the network flexibility, customizability and efficiency by softwarizing traditional dedicated hardware based functions to virtualized network functions. The prosperous potential of edge cloud makes it an ideal platform to host the network functions. From the perspective of network service providers, an inevitable concern is how to reduce the overall cost for renting various resources from infrastructure providers. In this paper, unlike existing related studies assuming a preknown network traffic demand, we alternatively consider a practical case without any prior knowledge. We investigate how to dynamically minimize the overall operational cost with joint consideration of packet scheduling, network function management and resource allocation. The tradeoff between the queue backlog and overall cost is analyzed using a Lyapunov optimization framework. A backpressure based online scheduling algorithm is proposed and its efficiency is extensively evaluated by trace-driven simulations.