If you’re using this example Scheduling | Umbraco CMS on a V10 solution, on Umbraco Cloud you should change this namespace Umbraco.Cms.Core.Scoping to Umbraco.Cms.Infrastructure.Scoping
Whether this is related to Umbraco Cloud or not, I have no idea.
This namespace Umbraco.Cms.Core.Scoping is marked as OBSOLETE