public IActionResult RunNow(string scheduledTaskSystemName)
        {
            if (scheduledTaskSystemName.IsNullEmptyOrWhiteSpace())
            {
                return(BadRequest());
            }
            var scheduledTask = _scheduledTaskService.FirstOrDefault(x => x.SystemName == scheduledTaskSystemName);
            var iTask         = DependencyResolver.Resolve <ITask>(scheduledTaskSystemName);

            try
            {
                ScheduledTaskHelper.RunScheduledTask(scheduledTask, iTask, _scheduledTaskService, _logger, false);
            }
            catch (Exception)
            {
                return(R.Fail.With("error",
                                   T("An error occurred while running the task. Please check the log for details")).Result);
            }
            return(R.Success.Result);
        }