You can do this with a job that runs a script that uses the adTempus API to find and kill all the other jobs.
To do this, create a new job and schedule it for 7:10 PM. Important: this job has to run under a user account that has an adTempus login with permission to execute/terminate all jobs. Otherwise it won't be able to terminate the jobs, because the API authenticates all actions.
Add a step to this job to run a new script. In the script editor, change the language to C# and replace the script code with this code:
using System;
using System.Text;
using System.Collections.Generic;
using ArcanaDevelopment.adTempus.ApplicationIntegration;
using ArcanaDevelopment.adTempus.Shared;
using ArcanaDevelopment.adTempus.Client;
namespace UserScript
{
public class UserScript : ArcanaDevelopment.adTempus.ApplicationIntegration.UserScriptBase
{
public override Object Run()
{
var sb = new StringBuilder();
//connect to the local server
using (var session = Scheduler.Connect(".", LoginAuthenticationType.Windows, "", ""))
{
using (var context = session.NewDataContext())
{
var parms=new InstanceQueryParameters();
//Add WellKnownOIDs.RootGroup to look at all jobs.
parms.TargetObjects.Add(WellKnownOIDs.RootGroup);
//look for all active instances
parms.Statuses.AddRange(JobStatusHelpers.ActiveStatuses);
//fetch all active job instances on the server
var instances=context.GetJobHistory(parms);
foreach(ExecutionHistoryItem instance in instances)
{
if(!instance.OID.ObjectID.Equals(Parameters.ExecutionHistoryOID.Value)) //make sure we don't kill the job running the script
{
sb.AppendFormat("Job {0} instance {1}\r\n", instance.JobName, instance.InstanceID);
instance.Terminate(TerminationOptions.None);
}
}
}
if(sb.Length==0)
{
adTempus.LogMessage(MessageTypeEnum.Informational,0,"No running jobs found");
}
else
{
adTempus.LogMessage(MessageTypeEnum.Informational, 0, "Terminated the following jobs:\r\n" + sb.ToString());
}
}
return 0;
}
}
}
This script uses the adTempus API to connect to the the server and query for all the active job instances. It then sends a terminate command to each of them. Finally it logs a message indicating which jobs/instances it terminated.
It's possible to refine the script to, for example, look only at jobs in a certain group.