public Task StartAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("The auto-start is starting.");

            if (cancellationToken.IsCancellationRequested)
            {
                return(Task.CompletedTask);
            }

            var path = _remoteSettings.AutoStartPath();

            // load the api's
            var files = Directory.GetFiles(path, "dexih_api*.json");

            foreach (var file in files)
            {
                try
                {
                    var fileData  = File.ReadAllText(file);
                    var autoStart = fileData.Deserialize <AutoStart>();
                    autoStart.Decrypt(_remoteSettings.AppSettings.EncryptionKey);
                    _logger.LogInformation($"Auto-starting the apn in file {file}");
                    _liveApis.ActivateApi(autoStart);
                }
                catch (Exception ex)
                {
                    _logger.LogError(500, ex, "Error auto-starting the file {0}: {1}", file, ex.Message);
                }
            }

            // load the datajobs's
            files = Directory.GetFiles(path, "dexih_datajob*.json");
            foreach (var file in files)
            {
                try
                {
                    var fileData  = File.ReadAllText(file);
                    var autoStart = fileData.Deserialize <AutoStart>();
                    autoStart.Decrypt(_remoteSettings.AppSettings.EncryptionKey);
                    _logger.LogInformation($"Auto-starting the datajob in file {file}");
                    _remoteOperations.ActivateDatajob(autoStart);
                }
                catch (Exception ex)
                {
                    _logger.LogError(500, ex, "Error auto-starting the file {0}: {1}", file, ex.Message);
                }
            }

            _logger.LogInformation("The auto-start is started.");

            return(Task.CompletedTask);
        }