<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>taskscheduler Work Item Rss Feed</title><link>http://www.codeplex.com/taskscheduler/WorkItem/List.aspx</link><description>taskscheduler Work Item Rss Description</description><item><title>Closed Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029]</title><link>http://taskscheduler.codeplex.com/workitem/11029</link><description>Hi Folks,&lt;br /&gt;&lt;br /&gt;I do have a requirement&amp;#58;&lt;br /&gt;&lt;br /&gt;1.Need to get the status of all scheduled tasks schduled in a remote machine&lt;br /&gt;2.Based on status need to send an alert email&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is my sample code&amp;#58;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System&amp;#59;&lt;br /&gt;using System.Collections.Generic&amp;#59;&lt;br /&gt;using System.Linq&amp;#59;&lt;br /&gt;using System.Text&amp;#59;&lt;br /&gt;using Microsoft.Win32.TaskScheduler&amp;#59;&lt;br /&gt;using System.Threading&amp;#59;&lt;br /&gt;using System.Diagnostics&amp;#59;&lt;br /&gt;using System.Net&amp;#59;&lt;br /&gt;using System.Net.Mail&amp;#59;&lt;br /&gt;using System.Data.SqlClient&amp;#59;&lt;br /&gt;using System.Data&amp;#59;&lt;br /&gt;using System.Devices&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Devices.RemoteDeviceManager&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Diagonistics.EventLog&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace TaskSchedulerRemote&lt;br /&gt;&amp;#123;&lt;br /&gt;    class Program&lt;br /&gt;    &amp;#123;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService  01_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain1&amp;#34;, &amp;#34;pwd0&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService 02_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain2&amp;#34;, &amp;#34;pwd1&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        static void Main&amp;#40;string&amp;#91;&amp;#93; args&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            using &amp;#40;TaskService task &amp;#61; new TaskService&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                TaskDefinition td &amp;#61; task.NewTask&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                td.RegistrationInfo.Description &amp;#61; &amp;#34;RF Report&amp;#34;&amp;#59;&lt;br /&gt;                td.Actions.Add&amp;#40;new ExecAction&amp;#40;&amp;#34;notepad.exe&amp;#34;, &amp;#34;c&amp;#58;&amp;#92;test.log&amp;#34;, null&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                while &amp;#40;true&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    Task taskdDef &amp;#61; task.FindTask&amp;#40;&amp;#34;RF Report&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string registeredTask&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string&amp;#91;&amp;#93; taskCollection &amp;#61; &amp;#123; &amp;#34;&amp;#34;, &amp;#34;&amp;#34;, &amp;#34;&amp;#34; &amp;#125;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;foreach &amp;#40;string str in taskCollection&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;For Each registeredTask In taskCollection&lt;br /&gt;&lt;br /&gt;                    switch &amp;#40;taskdDef.State&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        case TaskState.Queued&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Queued&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Ready&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Ready&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Unknown&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Unknown&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Disabled&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Disabled&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Running&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Running&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                    Thread.Sleep&amp;#40;10000&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailMessage Msg &amp;#61; new MailMessage&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailAddress fromMail &amp;#61; new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Sender e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.From &amp;#61; fromMail&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Recipient e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.To.Add&amp;#40;new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Priority &amp;#61; MailPriority.High&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Subject of e-mail&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Subject &amp;#61; &amp;#34;Scheduled Task Status Report&amp;#58;&amp;#34; &amp;#43; System.DateTime.Now&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Hi All,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Please find below the status report of schduled task &amp;#58;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;Table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Regards,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#34; &amp;#43;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#34;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;b&amp;#62;NOTE&amp;#58; This is an automated mail. Please, do not reply.&amp;#60;&amp;#47;b&amp;#62; &amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.IsBodyHtml &amp;#61; true&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string sSmtpServer &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;sSmtpServer &amp;#61; &amp;#34;mailservername&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;SmtpClient a &amp;#61; new SmtpClient&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.Host &amp;#61; sSmtpServer&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.EnableSsl &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;try&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Sending mail...&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    a.Send&amp;#40;Msg&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Mail was sent successfully&amp;#33;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                    &amp;#47;&amp;#47;catch &amp;#40;Exception ep&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;failed to send mail&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;ep.Message&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                string sSource &amp;#61; &amp;#34;MyCustom Group&amp;#34;&amp;#59;&lt;br /&gt;                string sLog &amp;#61; &amp;#34;Application&amp;#34;&amp;#59;&lt;br /&gt;                string sEvent &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;EventLog.SourceExists&amp;#40;sSource&amp;#41;&amp;#41;&lt;br /&gt;                    EventLog.CreateEventSource&amp;#40;sSource, sLog&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                EventLog.WriteEntry&amp;#40;sSource, sEvent, EventLogEntryType.Error, 234&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not sure how to connect to the remote server&amp;#47;machine and read and get the task status details and also need to amend that status details in email.&lt;br /&gt;&lt;br /&gt;Could anyone please look into my code and suggest.&lt;br /&gt;&lt;br /&gt;Many Thanks,&lt;br /&gt;Sisir&lt;br /&gt;</description><author>dahall</author><pubDate>Sun, 19 May 2013 04:41:00 GMT</pubDate><guid isPermaLink="false">Closed Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029] 20130519044100A</guid></item><item><title>Commented Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029]</title><link>http://taskscheduler.codeplex.com/workitem/11029</link><description>Hi Folks,&lt;br /&gt;&lt;br /&gt;I do have a requirement&amp;#58;&lt;br /&gt;&lt;br /&gt;1.Need to get the status of all scheduled tasks schduled in a remote machine&lt;br /&gt;2.Based on status need to send an alert email&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is my sample code&amp;#58;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System&amp;#59;&lt;br /&gt;using System.Collections.Generic&amp;#59;&lt;br /&gt;using System.Linq&amp;#59;&lt;br /&gt;using System.Text&amp;#59;&lt;br /&gt;using Microsoft.Win32.TaskScheduler&amp;#59;&lt;br /&gt;using System.Threading&amp;#59;&lt;br /&gt;using System.Diagnostics&amp;#59;&lt;br /&gt;using System.Net&amp;#59;&lt;br /&gt;using System.Net.Mail&amp;#59;&lt;br /&gt;using System.Data.SqlClient&amp;#59;&lt;br /&gt;using System.Data&amp;#59;&lt;br /&gt;using System.Devices&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Devices.RemoteDeviceManager&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Diagonistics.EventLog&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace TaskSchedulerRemote&lt;br /&gt;&amp;#123;&lt;br /&gt;    class Program&lt;br /&gt;    &amp;#123;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService  01_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain1&amp;#34;, &amp;#34;pwd0&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService 02_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain2&amp;#34;, &amp;#34;pwd1&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        static void Main&amp;#40;string&amp;#91;&amp;#93; args&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            using &amp;#40;TaskService task &amp;#61; new TaskService&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                TaskDefinition td &amp;#61; task.NewTask&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                td.RegistrationInfo.Description &amp;#61; &amp;#34;RF Report&amp;#34;&amp;#59;&lt;br /&gt;                td.Actions.Add&amp;#40;new ExecAction&amp;#40;&amp;#34;notepad.exe&amp;#34;, &amp;#34;c&amp;#58;&amp;#92;test.log&amp;#34;, null&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                while &amp;#40;true&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    Task taskdDef &amp;#61; task.FindTask&amp;#40;&amp;#34;RF Report&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string registeredTask&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string&amp;#91;&amp;#93; taskCollection &amp;#61; &amp;#123; &amp;#34;&amp;#34;, &amp;#34;&amp;#34;, &amp;#34;&amp;#34; &amp;#125;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;foreach &amp;#40;string str in taskCollection&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;For Each registeredTask In taskCollection&lt;br /&gt;&lt;br /&gt;                    switch &amp;#40;taskdDef.State&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        case TaskState.Queued&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Queued&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Ready&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Ready&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Unknown&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Unknown&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Disabled&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Disabled&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Running&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Running&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                    Thread.Sleep&amp;#40;10000&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailMessage Msg &amp;#61; new MailMessage&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailAddress fromMail &amp;#61; new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Sender e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.From &amp;#61; fromMail&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Recipient e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.To.Add&amp;#40;new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Priority &amp;#61; MailPriority.High&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Subject of e-mail&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Subject &amp;#61; &amp;#34;Scheduled Task Status Report&amp;#58;&amp;#34; &amp;#43; System.DateTime.Now&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Hi All,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Please find below the status report of schduled task &amp;#58;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;Table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Regards,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#34; &amp;#43;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#34;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;b&amp;#62;NOTE&amp;#58; This is an automated mail. Please, do not reply.&amp;#60;&amp;#47;b&amp;#62; &amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.IsBodyHtml &amp;#61; true&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string sSmtpServer &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;sSmtpServer &amp;#61; &amp;#34;mailservername&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;SmtpClient a &amp;#61; new SmtpClient&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.Host &amp;#61; sSmtpServer&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.EnableSsl &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;try&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Sending mail...&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    a.Send&amp;#40;Msg&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Mail was sent successfully&amp;#33;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                    &amp;#47;&amp;#47;catch &amp;#40;Exception ep&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;failed to send mail&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;ep.Message&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                string sSource &amp;#61; &amp;#34;MyCustom Group&amp;#34;&amp;#59;&lt;br /&gt;                string sLog &amp;#61; &amp;#34;Application&amp;#34;&amp;#59;&lt;br /&gt;                string sEvent &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;EventLog.SourceExists&amp;#40;sSource&amp;#41;&amp;#41;&lt;br /&gt;                    EventLog.CreateEventSource&amp;#40;sSource, sLog&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                EventLog.WriteEntry&amp;#40;sSource, sEvent, EventLogEntryType.Error, 234&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not sure how to connect to the remote server&amp;#47;machine and read and get the task status details and also need to amend that status details in email.&lt;br /&gt;&lt;br /&gt;Could anyone please look into my code and suggest.&lt;br /&gt;&lt;br /&gt;Many Thanks,&lt;br /&gt;Sisir&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;I'm not clear what you are trying to accomplish. However, you can find examples of how to connect to a remote server and how to retrieve information about tasks in the Documentation on the [Examples page](https://taskscheduler.codeplex.com/wikipage?title=Examples). I don't believe this is an issue with the library so I will be closing this issue.&lt;/p&gt;</description><author>dahall</author><pubDate>Sun, 19 May 2013 04:39:20 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029] 20130519043920A</guid></item><item><title>Created Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029]</title><link>http://taskscheduler.codeplex.com/workitem/11029</link><description>Hi Folks,&lt;br /&gt;&lt;br /&gt;I do have a requirement&amp;#58;&lt;br /&gt;&lt;br /&gt;1.Need to get the status of all scheduled tasks schduled in a remote machine&lt;br /&gt;2.Based on status need to send an alert email&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is my sample code&amp;#58;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System&amp;#59;&lt;br /&gt;using System.Collections.Generic&amp;#59;&lt;br /&gt;using System.Linq&amp;#59;&lt;br /&gt;using System.Text&amp;#59;&lt;br /&gt;using Microsoft.Win32.TaskScheduler&amp;#59;&lt;br /&gt;using System.Threading&amp;#59;&lt;br /&gt;using System.Diagnostics&amp;#59;&lt;br /&gt;using System.Net&amp;#59;&lt;br /&gt;using System.Net.Mail&amp;#59;&lt;br /&gt;using System.Data.SqlClient&amp;#59;&lt;br /&gt;using System.Data&amp;#59;&lt;br /&gt;using System.Devices&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Devices.RemoteDeviceManager&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;using System.Diagonistics.EventLog&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;namespace TaskSchedulerRemote&lt;br /&gt;&amp;#123;&lt;br /&gt;    class Program&lt;br /&gt;    &amp;#123;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService  01_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain1&amp;#34;, &amp;#34;pwd0&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#47;&amp;#47;TaskService 02_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain2&amp;#34;, &amp;#34;pwd1&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;        static void Main&amp;#40;string&amp;#91;&amp;#93; args&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            using &amp;#40;TaskService task &amp;#61; new TaskService&amp;#40;&amp;#41;&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                TaskDefinition td &amp;#61; task.NewTask&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                td.RegistrationInfo.Description &amp;#61; &amp;#34;RF Report&amp;#34;&amp;#59;&lt;br /&gt;                td.Actions.Add&amp;#40;new ExecAction&amp;#40;&amp;#34;notepad.exe&amp;#34;, &amp;#34;c&amp;#58;&amp;#92;test.log&amp;#34;, null&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                while &amp;#40;true&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    Task taskdDef &amp;#61; task.FindTask&amp;#40;&amp;#34;RF Report&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string registeredTask&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string&amp;#91;&amp;#93; taskCollection &amp;#61; &amp;#123; &amp;#34;&amp;#34;, &amp;#34;&amp;#34;, &amp;#34;&amp;#34; &amp;#125;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;foreach &amp;#40;string str in taskCollection&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;For Each registeredTask In taskCollection&lt;br /&gt;&lt;br /&gt;                    switch &amp;#40;taskdDef.State&amp;#41;&lt;br /&gt;                    &amp;#123;&lt;br /&gt;                        case TaskState.Queued&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Queued&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Ready&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Ready&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Unknown&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Unknown&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Disabled&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Disabled&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                        case TaskState.Running&amp;#58;&lt;br /&gt;                            Console.WriteLine&amp;#40;&amp;#34;Running&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                            break&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                    Thread.Sleep&amp;#40;10000&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailMessage Msg &amp;#61; new MailMessage&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;MailAddress fromMail &amp;#61; new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Sender e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.From &amp;#61; fromMail&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Recipient e-mail address.&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.To.Add&amp;#40;new MailAddress&amp;#40;&amp;#34;emailid&amp;#34;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Priority &amp;#61; MailPriority.High&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#47;&amp;#47; Subject of e-mail&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Subject &amp;#61; &amp;#34;Scheduled Task Status Report&amp;#58;&amp;#34; &amp;#43; System.DateTime.Now&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Hi All,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Please find below the status report of schduled task &amp;#58;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;Table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.Body &amp;#43;&amp;#61; &amp;#34;&amp;#60;html&amp;#62;&amp;#60;body&amp;#62;&amp;#60;Table&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;Regards,&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#34; &amp;#43;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#34;&amp;#60;tr&amp;#62;&amp;#60;td&amp;#62;&amp;#60;b&amp;#62;NOTE&amp;#58; This is an automated mail. Please, do not reply.&amp;#60;&amp;#47;b&amp;#62; &amp;#60;&amp;#47;td&amp;#62;&amp;#60;&amp;#47;tr&amp;#62;&amp;#60;&amp;#47;table&amp;#62;&amp;#60;&amp;#47;body&amp;#62;&amp;#60;&amp;#47;html&amp;#62;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;Msg.IsBodyHtml &amp;#61; true&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;string sSmtpServer &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;sSmtpServer &amp;#61; &amp;#34;mailservername&amp;#34;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;SmtpClient a &amp;#61; new SmtpClient&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.Host &amp;#61; sSmtpServer&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;a.EnableSsl &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;try&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Sending mail...&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    a.Send&amp;#40;Msg&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;Mail was sent successfully&amp;#33;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                    &amp;#47;&amp;#47;catch &amp;#40;Exception ep&amp;#41;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#123;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;&amp;#34;failed to send mail&amp;#58;&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;    Console.WriteLine&amp;#40;ep.Message&amp;#41;&amp;#59;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;#47;&amp;#47;&amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;&lt;br /&gt;                string sSource &amp;#61; &amp;#34;MyCustom Group&amp;#34;&amp;#59;&lt;br /&gt;                string sLog &amp;#61; &amp;#34;Application&amp;#34;&amp;#59;&lt;br /&gt;                string sEvent &amp;#61; &amp;#34;&amp;#34;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;EventLog.SourceExists&amp;#40;sSource&amp;#41;&amp;#41;&lt;br /&gt;                    EventLog.CreateEventSource&amp;#40;sSource, sLog&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                EventLog.WriteEntry&amp;#40;sSource, sEvent, EventLogEntryType.Error, 234&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Not sure how to connect to the remote server&amp;#47;machine and read and get the task status details and also need to amend that status details in email.&lt;br /&gt;&lt;br /&gt;Could anyone please look into my code and suggest.&lt;br /&gt;&lt;br /&gt;Many Thanks,&lt;br /&gt;Sisir&lt;br /&gt;</description><author>sisir14</author><pubDate>Fri, 17 May 2013 13:59:14 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Code to check the staus of scheduled task in remote machine and fire email [11029] 20130517015914P</guid></item><item><title>Commented Issue: how to get task from remote server [10350]</title><link>http://taskscheduler.codeplex.com/workitem/10350</link><description>I want to call remotely windows task scheduler for this i am using Microsoft.Win32.TaskScheduler.dll and created object of TaskService class like&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;TaskService  01_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain1&amp;#34;, &amp;#34;pwd0&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;TaskService 02_server &amp;#61; getTaskService&amp;#40;&amp;#34;&amp;#92;&amp;#92;&amp;#92;&amp;#92;123.122.222.222&amp;#34;, &amp;#34;administrator&amp;#34;, &amp;#34;domain2&amp;#34;, &amp;#34;pwd1&amp;#34;, true&amp;#41;&amp;#59;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;and bind task to grodview &lt;br /&gt;&amp;#160;&lt;br /&gt;for server 01_serve&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;DataTable dataTable &amp;#61; new DataTable&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;TaskName&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;TaskSchedule&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;TaskNextRun&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;TaskLastRun&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.Columns.Add&amp;#40;&amp;#34;State&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;dataTable.AcceptChanges&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;DataRow dataRow&amp;#59;&lt;br /&gt;StringBuilder sbTaskSchedule &amp;#61; new StringBuilder&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;Version ver &amp;#61;  01_server .HighestSupportedVersion&amp;#59;&lt;br /&gt;bool newVer &amp;#61; &amp;#40;ver &amp;#62;&amp;#61; new Version&amp;#40;1, 2&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;TaskFolder tf &amp;#61; 01_serve.RootFolder&amp;#59;&lt;br /&gt;&lt;br /&gt;int ctaskNx &amp;#61; 01_serve.RootFolder.Tasks.Count&amp;#59;&lt;br /&gt;&lt;br /&gt;for &amp;#40;int i &amp;#61; 0&amp;#59; i &amp;#60; ctaskNx&amp;#59; i&amp;#43;&amp;#43;&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    m_Task &amp;#61; 01_serve.RootFolder.Tasks&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;&lt;br /&gt;    string strFileNamePath &amp;#61; m_Task.Definition.Actions.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;    if &amp;#40;strFileNamePath.Contains&amp;#40;&amp;#34;.vbs&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;        dataRow &amp;#61; dataTable.NewRow&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskName&amp;#34;&amp;#93; &amp;#61; m_Task.Name.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskNextRun&amp;#34;&amp;#93; &amp;#61; m_Task.NextRunTime.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskLastRun&amp;#34;&amp;#93; &amp;#61; m_Task.LastRunTime.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;State&amp;#34;&amp;#93; &amp;#61; m_Task.State.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataTable.Rows.Add&amp;#40;dataRow&amp;#41;&amp;#59;&lt;br /&gt;        dataTable.AcceptChanges&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;for server 02_serve&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Version ver &amp;#61;  02_server .HighestSupportedVersion&amp;#59;&lt;br /&gt;bool newVer &amp;#61; &amp;#40;ver &amp;#62;&amp;#61; new Version&amp;#40;1, 2&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;TaskFolder tf &amp;#61; 02_server.RootFolder&amp;#59;&lt;br /&gt;&lt;br /&gt;int ctaskNx &amp;#61; 02_server.RootFolder.Tasks.Count&amp;#59;&lt;br /&gt;&lt;br /&gt;for &amp;#40;int i &amp;#61; 0&amp;#59; i &amp;#60; ctaskNx&amp;#59; i&amp;#43;&amp;#43;&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    m_Task &amp;#61; 02_server.RootFolder.Tasks&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;&lt;br /&gt;    string strFileNamePath &amp;#61; m_Task.Definition.Actions.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;    if &amp;#40;strFileNamePath.Contains&amp;#40;&amp;#34;.vbs&amp;#34;&amp;#41;&amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;        dataRow &amp;#61; dataTable.NewRow&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskName&amp;#34;&amp;#93; &amp;#61; m_Task.Name.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskNextRun&amp;#34;&amp;#93; &amp;#61; m_Task.NextRunTime.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;TaskLastRun&amp;#34;&amp;#93; &amp;#61; m_Task.LastRunTime.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataRow&amp;#91;&amp;#34;State&amp;#34;&amp;#93; &amp;#61; m_Task.State.ToString&amp;#40;&amp;#41;.Trim&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        dataTable.Rows.Add&amp;#40;dataRow&amp;#41;&amp;#59;&lt;br /&gt;        dataTable.AcceptChanges&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;but i am not able to get task from remote server&lt;br /&gt;please guide me where i am wrong&lt;br /&gt;Comments: ** Comment from web user: sisir14 ** &lt;p&gt;Hi Team,&lt;/p&gt;&lt;p&gt;I also do have the same question.Any update answer on this please.&lt;/p&gt;&lt;p&gt;How to remote connect a remote machine to check the status of scheduled task&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Many Thanks,&lt;br&gt;Sisir&lt;/p&gt;</description><author>sisir14</author><pubDate>Fri, 17 May 2013 07:14:57 GMT</pubDate><guid isPermaLink="false">Commented Issue: how to get task from remote server [10350] 20130517071457A</guid></item><item><title>Closed Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: See Comments</description><author>dahall</author><pubDate>Mon, 29 Apr 2013 21:51:04 GMT</pubDate><guid isPermaLink="false">Closed Issue: my scheduler task not working properly after then [10951] 20130429095104P</guid></item><item><title>Commented Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;There is a potential race condition when multiple instances of the COM object access the same task. I handle this exception in the library, but the native application does not. This is the error you are seeing. The only way to avoid it is to not access the same task through the library that is being viewed in the native app.&lt;/p&gt;</description><author>dahall</author><pubDate>Mon, 29 Apr 2013 21:49:44 GMT</pubDate><guid isPermaLink="false">Commented Issue: my scheduler task not working properly after then [10951] 20130429094944P</guid></item><item><title>Commented Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: ** Comment from web user: dev_umut ** &lt;p&gt;Yes. Im seein this error on microsoft Windows task scheduler. But I tried explain, its happened by library. &lt;/p&gt;</description><author>dev_umut</author><pubDate>Mon, 29 Apr 2013 19:31:53 GMT</pubDate><guid isPermaLink="false">Commented Issue: my scheduler task not working properly after then [10951] 20130429073153P</guid></item><item><title>Commented Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;This error is not coming from this library. Are you seeing this error from the Windows Task Scheduler application? If so, then please contact Microsoft for support.&lt;/p&gt;</description><author>dahall</author><pubDate>Mon, 29 Apr 2013 16:19:07 GMT</pubDate><guid isPermaLink="false">Commented Issue: my scheduler task not working properly after then [10951] 20130429041907P</guid></item><item><title>Commented Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: ** Comment from web user: dev_umut ** &lt;p&gt;Its crushed when im debugging create simple task example. Im opened same time Windows schedule task window. &lt;/p&gt;</description><author>dev_umut</author><pubDate>Sat, 27 Apr 2013 19:25:45 GMT</pubDate><guid isPermaLink="false">Commented Issue: my scheduler task not working properly after then [10951] 20130427072545P</guid></item><item><title>Commented Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;Please provide references to any code that is running, how you have created the task, how you're accessing the task, etc. The information you have provided is insufficient for me to act on.&lt;/p&gt;</description><author>dahall</author><pubDate>Sat, 27 Apr 2013 16:49:26 GMT</pubDate><guid isPermaLink="false">Commented Issue: my scheduler task not working properly after then [10951] 20130427044926P</guid></item><item><title>Created Issue: my scheduler task not working properly after then [10951]</title><link>http://taskscheduler.codeplex.com/workitem/10951</link><description>&amp;#34;the selected task &amp;#123;0&amp;#125; no longer exists. to see the current task click refresh&amp;#34; task scheduler throwing exception while  boot up and refreshing.&lt;br /&gt;</description><author>dev_umut</author><pubDate>Thu, 25 Apr 2013 13:23:53 GMT</pubDate><guid isPermaLink="false">Created Issue: my scheduler task not working properly after then [10951] 20130425012353P</guid></item><item><title>Commented Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711]</title><link>http://taskscheduler.codeplex.com/workitem/9711</link><description>I received the following exception when calling GetRunningTasks&amp;#58;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#34;The function attempted to use a name that is reserved for use by another transaction. &amp;#40;Exception from HRESULT&amp;#58; 0x80071A90&amp;#41;&amp;#34;&lt;br /&gt;&amp;#160;&lt;br /&gt;Here is the call stack&amp;#58;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.V2Interop.TaskSchedulerClass.GetRunningTasks&amp;#40;Int32 flags&amp;#41;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.TaskService.GetRunningTasks&amp;#40;Boolean includeHidden&amp;#41; in TaskService.cs&amp;#58;line 113&lt;br /&gt;&amp;#160;&lt;br /&gt;Section of code &amp;#40;line 113 is the return statement&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;public RunningTaskCollection GetRunningTasks&amp;#40;bool includeHidden&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    return v2 &amp;#63; new RunningTaskCollection&amp;#40;this, v2TaskService.GetRunningTasks&amp;#40;includeHidden &amp;#63; 1 &amp;#58; 0&amp;#41;&amp;#41; &amp;#58; new RunningTaskCollection&amp;#40;this&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;The next time I called GetRunningTasks it succeeded but I&amp;#39;m concerned this exception is going to happen again.&lt;br /&gt;&amp;#160;&lt;br /&gt;Thanks,&lt;br /&gt;Michael DePouw&lt;br /&gt;Comments: ** Comment from web user: spottedmahn ** &lt;p&gt;Thanks @dahall!  That's great news.  Thanks for following up on the matter.&lt;/p&gt;&lt;p&gt;Regards,&lt;br&gt;Mike DePouw&lt;/p&gt;</description><author>spottedmahn</author><pubDate>Mon, 11 Mar 2013 19:57:45 GMT</pubDate><guid isPermaLink="false">Commented Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711] 20130311075745P</guid></item><item><title>Closed Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711]</title><link>http://taskscheduler.codeplex.com/workitem/9711</link><description>I received the following exception when calling GetRunningTasks&amp;#58;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#34;The function attempted to use a name that is reserved for use by another transaction. &amp;#40;Exception from HRESULT&amp;#58; 0x80071A90&amp;#41;&amp;#34;&lt;br /&gt;&amp;#160;&lt;br /&gt;Here is the call stack&amp;#58;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.V2Interop.TaskSchedulerClass.GetRunningTasks&amp;#40;Int32 flags&amp;#41;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.TaskService.GetRunningTasks&amp;#40;Boolean includeHidden&amp;#41; in TaskService.cs&amp;#58;line 113&lt;br /&gt;&amp;#160;&lt;br /&gt;Section of code &amp;#40;line 113 is the return statement&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;public RunningTaskCollection GetRunningTasks&amp;#40;bool includeHidden&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    return v2 &amp;#63; new RunningTaskCollection&amp;#40;this, v2TaskService.GetRunningTasks&amp;#40;includeHidden &amp;#63; 1 &amp;#58; 0&amp;#41;&amp;#41; &amp;#58; new RunningTaskCollection&amp;#40;this&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;The next time I called GetRunningTasks it succeeded but I&amp;#39;m concerned this exception is going to happen again.&lt;br /&gt;&amp;#160;&lt;br /&gt;Thanks,&lt;br /&gt;Michael DePouw&lt;br /&gt;Comments: Reported to Microsoft.</description><author>dahall</author><pubDate>Mon, 11 Mar 2013 19:18:31 GMT</pubDate><guid isPermaLink="false">Closed Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711] 20130311071831P</guid></item><item><title>Commented Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711]</title><link>http://taskscheduler.codeplex.com/workitem/9711</link><description>I received the following exception when calling GetRunningTasks&amp;#58;&lt;br /&gt;&amp;#160;&lt;br /&gt;&amp;#34;The function attempted to use a name that is reserved for use by another transaction. &amp;#40;Exception from HRESULT&amp;#58; 0x80071A90&amp;#41;&amp;#34;&lt;br /&gt;&amp;#160;&lt;br /&gt;Here is the call stack&amp;#58;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.V2Interop.TaskSchedulerClass.GetRunningTasks&amp;#40;Int32 flags&amp;#41;&lt;br /&gt;at Microsoft.Win32.TaskScheduler.TaskService.GetRunningTasks&amp;#40;Boolean includeHidden&amp;#41; in TaskService.cs&amp;#58;line 113&lt;br /&gt;&amp;#160;&lt;br /&gt;Section of code &amp;#40;line 113 is the return statement&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;public RunningTaskCollection GetRunningTasks&amp;#40;bool includeHidden&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    return v2 &amp;#63; new RunningTaskCollection&amp;#40;this, v2TaskService.GetRunningTasks&amp;#40;includeHidden &amp;#63; 1 &amp;#58; 0&amp;#41;&amp;#41; &amp;#58; new RunningTaskCollection&amp;#40;this&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;The next time I called GetRunningTasks it succeeded but I&amp;#39;m concerned this exception is going to happen again.&lt;br /&gt;&amp;#160;&lt;br /&gt;Thanks,&lt;br /&gt;Michael DePouw&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;I ran this test with MMC up and found the same error. I have traced the problem back to the Microsoft native library. I will be posting the issue as a concurrency problem to Microsoft.&lt;/p&gt;</description><author>dahall</author><pubDate>Mon, 11 Mar 2013 19:18:18 GMT</pubDate><guid isPermaLink="false">Commented Issue: The function attempted to use a name that is reserved for use by another transaction. (Exception from HRESULT: 0x80071A90) [9711] 20130311071818P</guid></item><item><title>Closed Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778]</title><link>http://taskscheduler.codeplex.com/workitem/10778</link><description>using Microsoft.Win32.TaskScheduler.dll v1.9.2&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s assume I configure a scheduled task this way, with an end boundary set on the trigger.&lt;br /&gt;I get the following output &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;notice that IsActive and NextRunTime are correct as the trigger is deactivated because of the passed end boundary date&lt;br /&gt;&lt;br /&gt;now when I unset this end boundary date from Trigger&amp;#35;1 &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 30&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &amp;#224; 09&amp;#58;00 tous les jours, d&amp;#233;but &amp;#58; 15&amp;#47;01&amp;#47;2013&lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;IsActive still returns False, EndBoundary still returns the same date &amp;#40;and it shouldn&amp;#39;t&amp;#41;&lt;br /&gt;but NextRunTime is correct &amp;#33;&lt;br /&gt;&lt;br /&gt;Hope this helps&lt;br /&gt;LV&lt;br /&gt;Comments: Confirmed this to be a problem with Windows XP.</description><author>dahall</author><pubDate>Mon, 04 Feb 2013 20:20:40 GMT</pubDate><guid isPermaLink="false">Closed Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778] 20130204082040P</guid></item><item><title>Commented Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778]</title><link>http://taskscheduler.codeplex.com/workitem/10778</link><description>using Microsoft.Win32.TaskScheduler.dll v1.9.2&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s assume I configure a scheduled task this way, with an end boundary set on the trigger.&lt;br /&gt;I get the following output &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;notice that IsActive and NextRunTime are correct as the trigger is deactivated because of the passed end boundary date&lt;br /&gt;&lt;br /&gt;now when I unset this end boundary date from Trigger&amp;#35;1 &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 30&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &amp;#224; 09&amp;#58;00 tous les jours, d&amp;#233;but &amp;#58; 15&amp;#47;01&amp;#47;2013&lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;IsActive still returns False, EndBoundary still returns the same date &amp;#40;and it shouldn&amp;#39;t&amp;#41;&lt;br /&gt;but NextRunTime is correct &amp;#33;&lt;br /&gt;&lt;br /&gt;Hope this helps&lt;br /&gt;LV&lt;br /&gt;Comments: ** Comment from web user: lvorburger ** &lt;p&gt;Hi, thanks for answering&lt;br&gt;Indeed when using your task editor API, things work fine.&lt;br&gt;I am using Windows XP standard scheduled tasks UI.&lt;/p&gt;&lt;p&gt;Check the attached screenshot (sorry, in French) : I unchecked &amp;quot;expires&amp;quot; in the Win XP UI and it's still set in TaskDialog (which is &amp;quot;normal&amp;quot; as the expiration date is still set)&lt;/p&gt;&lt;p&gt;Guess the problem lies in Win (XP at least, I have no other version to test)...&lt;/p&gt;</description><author>lvorburger</author><pubDate>Wed, 30 Jan 2013 09:13:27 GMT</pubDate><guid isPermaLink="false">Commented Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778] 20130130091327A</guid></item><item><title>Commented Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778]</title><link>http://taskscheduler.codeplex.com/workitem/10778</link><description>using Microsoft.Win32.TaskScheduler.dll v1.9.2&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s assume I configure a scheduled task this way, with an end boundary set on the trigger.&lt;br /&gt;I get the following output &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;notice that IsActive and NextRunTime are correct as the trigger is deactivated because of the passed end boundary date&lt;br /&gt;&lt;br /&gt;now when I unset this end boundary date from Trigger&amp;#35;1 &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 30&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &amp;#224; 09&amp;#58;00 tous les jours, d&amp;#233;but &amp;#58; 15&amp;#47;01&amp;#47;2013&lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;IsActive still returns False, EndBoundary still returns the same date &amp;#40;and it shouldn&amp;#39;t&amp;#41;&lt;br /&gt;but NextRunTime is correct &amp;#33;&lt;br /&gt;&lt;br /&gt;Hope this helps&lt;br /&gt;LV&lt;br /&gt;Comments: ** Comment from web user: dahall ** &lt;p&gt;I just put together a very simple test for your issue and cannot repeat your results. Here's the code:&lt;br&gt;```&lt;br&gt;const string taskName = &amp;quot;Test&amp;quot;;&lt;br&gt;TaskDefinition td = ts.NewTask();&lt;br&gt;td.Triggers.Add(new DailyTrigger() { StartBoundary = new DateTime(2013, 1, 15, 9, 0, 0), EndBoundary = new DateTime(2013, 1, 22, 9, 0, 0) });&lt;br&gt;td.Actions.Add(new ExecAction(&amp;quot;notepad.exe&amp;quot;));&lt;br&gt;Task t = ts.RootFolder.RegisterTaskDefinition(taskName, td, TaskCreation.CreateOrUpdate, null, null, TaskLogonType.InteractiveToken);&lt;br&gt;output.Write(&amp;quot;***********************\r\nName: {0}\r\nEnabled: {1}\r\nLastRunTime: {2}\r\nState: {3}\r\nIsActive: {4}\r\nNextRunTime: {5}\r\nShouldHaveRun: {6}\r\nTriggerStart: {7}\r\nTriggerEnd: {8}\r\n&amp;quot;,&lt;br&gt;   t.Name, t.Enabled, t.LastRunTime, t.State, t.IsActive, t.NextRunTime, t.LastRunTime, t.Definition.Triggers[0].StartBoundary, t.Definition.Triggers[0].EndBoundary);&lt;br&gt;TaskEditDialog dlg = new TaskEditDialog(t);&lt;br&gt;if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)&lt;br&gt;{&lt;br&gt;   t = dlg.Task;&lt;br&gt;   output.Write(&amp;quot;***********************\r\nName: {0}\r\nEnabled: {1}\r\nLastRunTime: {2}\r\nState: {3}\r\nIsActive: {4}\r\nNextRunTime: {5}\r\nShouldHaveRun: {6}\r\nTriggerStart: {7}\r\nTriggerEnd: {8}\r\n&amp;quot;,&lt;br&gt;      t.Name, t.Enabled, t.LastRunTime, t.State, t.IsActive, t.NextRunTime, t.LastRunTime, t.Definition.Triggers[0].StartBoundary, t.Definition.Triggers[0].EndBoundary);&lt;br&gt;}&lt;br&gt;```&lt;br&gt;When I run it the first time, I get:&lt;br&gt;```&lt;br&gt;Name: Test&lt;br&gt;Enabled: True&lt;br&gt;LastRunTime: 1/1/0001 12:00:00 AM&lt;br&gt;State: Ready&lt;br&gt;IsActive: False&lt;br&gt;NextRunTime: 1/1/0001 12:00:00 AM&lt;br&gt;ShouldHaveRun: 1/1/0001 12:00:00 AM&lt;br&gt;TriggerStart: 1/15/2013 9:00:00 AM&lt;br&gt;TriggerEnd: 1/22/2013 9:00:00 AM&lt;br&gt;```&lt;br&gt;When I open the dialog, uncheck the checkbox for the trigger's &amp;quot;Expires&amp;quot; item and click OK, I get:&lt;br&gt;```&lt;br&gt;Name: Test&lt;br&gt;Enabled: True&lt;br&gt;LastRunTime: 1/1/0001 12:00:00 AM&lt;br&gt;State: Ready&lt;br&gt;IsActive: True&lt;br&gt;NextRunTime: 1/30/2013 9:00:00 AM&lt;br&gt;ShouldHaveRun: 1/1/0001 12:00:00 AM&lt;br&gt;TriggerStart: 1/15/2013 9:00:00 AM&lt;br&gt;TriggerEnd: 12/31/9999 11:59:59 PM&lt;br&gt;```&lt;/p&gt;</description><author>dahall</author><pubDate>Tue, 29 Jan 2013 17:00:14 GMT</pubDate><guid isPermaLink="false">Commented Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778] 20130129050014P</guid></item><item><title>Created Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778]</title><link>http://taskscheduler.codeplex.com/workitem/10778</link><description>using Microsoft.Win32.TaskScheduler.dll v1.9.2&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s assume I configure a scheduled task this way, with an end boundary set on the trigger.&lt;br /&gt;I get the following output &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;notice that IsActive and NextRunTime are correct as the trigger is deactivated because of the passed end boundary date&lt;br /&gt;&lt;br /&gt;now when I unset this end boundary date from Trigger&amp;#35;1 &amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Name &amp;#58; test&lt;br /&gt;Enabled &amp;#58; True&lt;br /&gt;LastRunTime &amp;#58; 01&amp;#47;01&amp;#47;0001 00&amp;#58;00&amp;#58;00&lt;br /&gt;LastTaskResult &amp;#58; 0&lt;br /&gt;State &amp;#58; Unknown&lt;br /&gt;IsActive &amp;#58; False&lt;br /&gt;NextRunTime &amp;#58; 30&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Should have run &amp;#58; 22&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;Trigger &amp;#35;1&amp;#58; &amp;#224; 09&amp;#58;00 tous les jours, d&amp;#233;but &amp;#58; 15&amp;#47;01&amp;#47;2013&lt;br /&gt;Start boundary &amp;#58; 15&amp;#47;01&amp;#47;2013 09&amp;#58;00&amp;#58;00&lt;br /&gt;End boundary &amp;#58; 22&amp;#47;01&amp;#47;2013 00&amp;#58;00&amp;#58;00&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;IsActive still returns False, EndBoundary still returns the same date &amp;#40;and it shouldn&amp;#39;t&amp;#41;&lt;br /&gt;but NextRunTime is correct &amp;#33;&lt;br /&gt;&lt;br /&gt;Hope this helps&lt;br /&gt;LV&lt;br /&gt;</description><author>lvorburger</author><pubDate>Tue, 29 Jan 2013 11:14:42 GMT</pubDate><guid isPermaLink="false">Created Issue: Unsetting a trigger's end boundary in UI does not reset the trigger's EndBoundary property [10778] 20130129111442A</guid></item><item><title>Closed Issue: TaskDefinition does not implement IDisposable [10612]</title><link>http://taskscheduler.codeplex.com/workitem/10612</link><description>Class TaskDefinition has Dispose&amp;#40;&amp;#41; method, but does not implement IDisposable, so we can&amp;#39;t use using&amp;#40;&amp;#41; statement&lt;br /&gt;Comments: &lt;p&gt;Fixed with 1.9.2. Thanks for finding this.&lt;/p&gt;</description><author>dahall</author><pubDate>Thu, 29 Nov 2012 23:45:45 GMT</pubDate><guid isPermaLink="false">Closed Issue: TaskDefinition does not implement IDisposable [10612] 20121129114545P</guid></item><item><title>Closed Issue: Nuget package version mismatch [10628]</title><link>http://taskscheduler.codeplex.com/workitem/10628</link><description>I just downloaded the latest packages from Nuget&amp;#58;&amp;#60;br&amp;#62;Task Scheduler Managed Wrapper UI Library&amp;#60;br&amp;#62;Task Scheduler Managed Wrapper&amp;#60;br&amp;#62;TimeSpan Helper Library&amp;#60;br&amp;#62;Windows Forms Aero-Wizard Control&amp;#60;br&amp;#62;WinForms Group Controls&amp;#60;br&amp;#62;&amp;#60;br&amp;#62;When I compile, I get&amp;#58;&amp;#60;br&amp;#62;Assembly &amp;#39;Microsoft.Win32.TaskSchedulerEditor, Version&amp;#61;1.9.0.23358, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;7be0d908c369d1a5&amp;#39; uses &amp;#39;GroupControls, Version&amp;#61;1.3.5.20798, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;3726d9da21b6ac8f&amp;#39; which has a higher version than referenced assembly &amp;#39;GroupControls, Version&amp;#61;1.3.5.14280, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;3726d9da21b6ac8f&amp;#39;&amp;#60;br&amp;#62;&amp;#60;br&amp;#62;And sure enough, the current Group Control package in Nuget has version 1.3.5.14280&amp;#60;br&amp;#62;&amp;#60;br&amp;#62;Can you please sync the Nuget packages version&amp;#63;&amp;#60;br&amp;#62;&amp;#60;br&amp;#62;Thanks,&amp;#60;br&amp;#62;&amp;#47;M&lt;br /&gt;Comments: &lt;p&gt;Fixed today with download version 1.9.1 and update to NuGet.&lt;/p&gt;</description><author>dahall</author><pubDate>Thu, 29 Nov 2012 20:44:13 GMT</pubDate><guid isPermaLink="false">Closed Issue: Nuget package version mismatch [10628] 20121129084413P</guid></item></channel></rss>