We investigate a constrained stochastic control problem connected to a financial contract representing a virtual factory. Commonly known as tolling agreements, these contracts are traded in free energy markets and include exercise flexibility in volume as well as in timing. Allowing for very general models for jump-diffusion processes with possibly time-dependant jump intensity, we study the control problem under the dynamic programming framework. After rigorously proving the dynamic programming principle, we define viscosity solutions of the associated Hamilton-Jacobi Bellman equation, and show the value is the unique solution of the equation. In fact, we give an original proof of a strong comparison principle using the maximum principle for semicontinuous functions that avoids some of the problems connected with unbounded Lévy measures that have been investigated in recent research of several authors.