private Task ScheduleSteamUpdates(List <Service> services)
        {
            var user = TCAdmin.SDK.Session.GetCurrentUser();

            var rTask = new RecurringTask
            {
                UserId   = user.UserId,
                Name     = "Batch Steam Update",
                Enabled  = true,
                Source   = this.GetType().Name,
                SourceId = "-1",
                Notes    = "Created by Steam Batch Update",
            };

            var trigger = new Trigger
            {
                TriggerType = TriggerType.OneTime,
                OneTime     = new TriggerOneTime
                {
                    StartTimeUtc = DateTime.UtcNow
                }
            };

            rTask.Triggers = new[] { trigger };

            foreach (var service in services)
            {
                var arguments = new XmlField
                {
                    ["ScheduledScript.ServiceId"]           = service.ServiceId,
                    ["ScheduledScript.ScriptId"]            = "steam",
                    ["ScheduledScript.ForceExecution"]      = true,
                    ["ScheduledScript.WaitEmpty"]           = false,
                    ["ScheduledScript.SkipExecution"]       = false,
                    ["ScheduledScript.CheckSteamApiUpdate"] = false
                };
                var step = new RecurringStep
                {
                    ModuleId  = "d3b2aa93-7e2b-4e0d-8080-67d14b2fa8a9",
                    ProcessId = 18,
                    ServerId  = service.ServerId,
                    Arguments = arguments.ToString(),
                };

                var steps = rTask.Steps.ToList();
                steps.Add(step);
                rTask.Steps = steps.ToArray();
            }

            rTask.GenerateKey();
            rTask.Save();
            rTask.ScheduleNextTask();

            return(new Task(rTask.TaskId));
        }
        /// <summary>
        /// フィールド情報を指定して、
        /// フィールドを追加します。
        /// </summary>
        /// <param name="this">フィールドコレクション</param>
        /// <param name="fieldInfo">フィールド情報</param>
        /// <returns>フィールドを返します。</returns>
        public static Field AddField(this FieldCollection @this, XmlField fieldInfo)
        {
            var field = @this.AddFieldAsXml(fieldInfo.ToString(), false, AddFieldOptions.AddFieldCheckDisplayName);

            return(field);
        }