How to get history list of any task

Topics: Errors, Examples
Oct 10, 2014 at 10:25 AM
Edited Oct 10, 2014 at 10:27 AM
Hi everyone

I have been testing creating/updating/deleting/getting task scheduler with Task Scheduler Managed Wrapper.

In the part of getting task . I would like to know how to get history list of any task to display in web page as figure shown in below.
Image

I have posted simple codes but now I have not found any solutions for this issue yet.
I am not sure whether "Task Scheduler Managed Wrapper" provide class , method property or anyway for getting history of task.
protected void ButtonGetTask_Click(object sender, EventArgs e)
    {
        using (TaskService ts = new TaskService())
        {
            try
            {
                Microsoft.Win32.TaskScheduler.Task task = ts.GetTask(TextBoxTaskName.Text);
      
                TaskDefinition td = task.Definition;
              
                Label1.Text = "Name=" + task.Name + "/IsActive=" + task.IsActive + "/State=" + task.State.ToString()  + "/Des=" + td.RegistrationInfo.Description;
              
                ButtonDelete.Visible = true;

            }
            catch (Exception ex)
            {

                Response.Write(ex.Message);
            }
            
        }
    }
Please recommend me.
Thank you for your help.
John
Coordinator
Oct 13, 2014 at 3:00 PM
Look at this example in the documentation.
Marked as answer by dahall on 10/22/2014 at 11:00 PM