private static IScheduledJobSpecification CreateDummyScheduledJob2() { IScheduledJobSpecification scheduledJobSpec = new ScheduledJobSpecification(); SystemProcessCall call = new SystemProcessCall(); call.Name = "DummyTestJob2"; call.Description = "A hard-coded scheduled job. 2."; call.Value = @"C:\Code\DEV\Duomo\Source\Common\Applications\HelloWorld\HelloWorld\bin\Release\Duomo.Common.HelloWorld.exe"; scheduledJobSpec.JobSpecification = call; DailyScheduleSpecification scheduleSpec = new DailyScheduleSpecification(); scheduleSpec.Time = DateTime.Parse("21:43:00"); scheduleSpec.DaysOfWeek = "__WTFSS"; scheduleSpec.HolidayCalendar = HolidayCalendarEnumeration.NONE; scheduledJobSpec.ScheduleSpecification = scheduleSpec; return scheduledJobSpec; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); JobRun jobRun = new JobRun(); jobRun.ID = 1; SystemProcessCall sysProcCall = new SystemProcessCall(); sysProcCall.Name = "Hello World!"; sysProcCall.Description = "Basic hello world."; sysProcCall.Value = @"C:\temp\temp.exe"; jobRun.Item = sysProcCall; jobRun.StartDateTime = DateTime.MaxValue; jobRun.EndDateTime = DateTime.MinValue; string rootedPath = @"C:\temp\TestJobRunFile"; XmlSerializer<JobRun>.StaticSerializeToRootedPath(jobRun, rootedPath); }