Occurs when all tasks of a Job is completed.
Namespace: AGI.Parallel.Client
Assembly: AGI.Parallel.Client (in AGI.Parallel.Client.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
public event EventHandler<JobCompletedEventArgs> JobCompleted
Visual Basic
Public Event JobCompleted As EventHandler(Of JobCompletedEventArgs)

Examples

  Copy imageCopy
using System;
using AGI.Parallel.Client;
using AGI.Parallel.Infrastructure;

namespace CodeSamples
{
    class Program
    {
        static void Main(string[] args)
        {
            using (IJobScheduler scheduler = new ClusterJobScheduler("localhost"))
            {
                scheduler.Connect();

                Job job = scheduler.CreateJob();
                job.AddTask(new OurTask());
                job.JobCompleted += new EventHandler<JobCompletedEventArgs>(OnJobCompletedHandler);
                job.Submit();
                job.WaitUntilDone();
            }
        }

        private static void OnJobCompletedHandler(object sender, JobCompletedEventArgs e)
        {
            Console.WriteLine("Job " + e.Job.Name + " is finished");
        }
    }

    [Serializable]
    class OurTask : Task
    {
        public override void Execute()
        {
        }
    }
}

See Also