In this paper we address Industrial IoT control applications which are safety-critical and real-time, and which have very low latency and jitter requirements. These control applications are virtualized as software tasks running on a Fog Computing Platform that brings computing and deterministic communication closer to the edge of the network, where the industrial "things" are located. Due to the demanding dependability and timing requirements, we consider that the tasks are scheduled with a static-cyclic scheduling policy. We are interested to determine the mapping of the tasks and a schedule table of their activation, such that we maximize the quality-of-control for the control tasks and meet the timing requirements for all tasks, including non-critical real-time tasks. We have proposed a Simulated Annealing-based metaheuristic to solve this problem, and we have evaluated the solution on several test cases.