This paper aims to incorporate safety specifications into Markov decision processes. Explicitly, we address the minimization problem up a stopping time with constraints. We establish formalism leaning upon evolution equation achieve our goal. show how compute function dynamic programming. In last part of paper, develop several algorithms for safe stochastic optimisation using linear and