On real-time scheduling in Fog computing: A Reinforcement Learning algorithm with application to smart cities