KNOWN ISSUE: CreateJobScheduleByName fails when trying to schedule a Deployment Solution job

Article:TECH28058  |  Created: 2007-03-28  |  Updated: 2007-04-02  |  Article URL http://www.symantec.com/docs/TECH28058
NOTE: If you are experiencing this particular known issue, we recommend that you Subscribe to receive email notification each time this article is updated. Subscribers will be the first to learn about any releases, status changes, workarounds or decisions made.
Article Type
Technical Solution

Issue



The function "CreateJobScheduleByName", using the C# development environment, fails when I passed the properly formed XML to schedule a job to run at a future date. The following error is displayed:

Creating the schedule by name...
An exception occoured
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: There is no row at position 0. ---> Altiris.ASDK.ASDKException: There is no row at position 0.

Environment



ASDK 1.3
Notification Server 6.0 SP3
Deployment Solution 6.8

Cause



The cause is unclear at this moment but it would seem to be a problem with parsing the XML passed to the function.

Solution



It appears that the documentation showing how to correctly form the XML for the schedule is incorrect. The following type of syntax should be used:
 
 string stringXML =
 @"<ScheduleAttributes xmlns='http://tempuri.org/ScheduleAttributes.xsd'>
  <Schedule_Attribute_Table>
  <start_time>4/4/2007 5:24:21 PM</start_time>
  <defer_time>5</defer_time>
  <recurrence_value>1</recurrence_value>
  <recurrence_type>Hours</recurrence_type>
  <batch_size>0</batch_size>
  <batch_interval>0</batch_interval>
  </Schedule_Attribute_Table>
 </ScheduleAttributes>";
 
 Console.WriteLine("Creating the schedule...");
 
 // Get the JobID.
 int[] jobID = jobManagement.GetJobIDs("DIR Command (Windows)");
 // The appropriate computer name should be substituted in <computerName>.
 string scheduleInfo = computerManagement.GetSchedulesByAttribute("<computerName>", 6);
 scheduleManagement.CreateJobSchedule(
  id,
  jobID[0],
  false,
  "ScheduleManagement",
  stringXML);
 

With this approach, the parsing of the schedule seems to be correctly intact.
 
The documentation issues have been entered into the tracking system to get them changed for the next release of the ASDK.

NOTE: CreateJobSchedule must be used rather than CreateJobSchedulByName due to DS authentication issues (see KB 33965).

Supplemental Materials

SourceDEFECT
ValueLB 58181
DescriptionLogged in Littlebuggy (Altiris - Lindon, Plymouth) database

Legacy ID



33966


Article URL http://www.symantec.com/docs/TECH28058


Terms of use for this information are found in Legal Notices