JAMS Developer Guide
Editing a Job Schedule

If you have an existing Job, you can edit its Schedule using C#. This sample shows you how to edit an existing Job Schedule. 

Editing a Job Schedule
Copy Code
// 
// Get a connection to our JAMS Server 
// You will probably have to change the node name "localhost" 
// to the name of your JAMS Server 
// 
var server = Server.GetServer("localhost"); 
// 
// Load the FileBackup job 
// 
Job.Load(out Job fileBackupJob, @"\Samples\FileBackup", server); 
// 
// Modify the Job's schedule 
// 
var scheduleTrigger = (ScheduleTrigger) fileBackupJob.Elements.Single(element => element is ScheduleTrigger); 
scheduleTrigger.ScheduledDate = "Tuesday, Thursday, Saturday"; 
scheduleTrigger.ExceptForDate = "First day of month"; 
scheduleTrigger.ScheduledTime = new TimeOfDay("3:45 PM"); 
// Save the Job 
fileBackupJob.Update(); 

 

 


Copyright © Fortra, LLC and its group of companies.
All trademarks and registered trademarks are the property of their respective owners.