Share via


WriteToString Method in Class SMS_ScheduleMethods

 

Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager

The WriteToString Windows Management Instrumentation (WMI) class method, in System Center 2012 R2 Configuration Manager, writes an interval string from SMS_ScheduleToken Server WMI Class objects.

The following syntax is simplified from Managed Object Format (MOF) code and defines the method.

Syntax

SInt32 WriteToString(
   SMS_ScheduleToken TokenData[],
   String StringData
);

Parameters

  • StringData
    Data type: String

    Qualifiers: [out]

    The interval string (details in table below).

  • TokenData
    Data type: SMS_ScheduleToken Array

    Qualifiers: [in]

    SMS_ScheduleToken Server WMI Class objects.

The ScheduleToken class uses two DWORDs to store the schedule data. 

Values for the first DWORD layed out as follows: 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +-----------+---------+---------+-------+-----------+-----------+ 
 |  Start    |  Start  |  Start  | Start |   Start   | Duration  | 
 |  Minute   |  Hour   |  Day    | Month |   Year    | Minutes   | 
 +-----------+---------+---------+-------+-----------+-----------+ 

Values for the second DWORD layed out as follows: 

 SCHED_TOKEN_RECUR_NONE 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +---------+---------+-----+-------------------------------------+ 
 | Duration| Duration|Flags|           Unused                  |U| 
 | Hours   | Days    |     |                                   |T| 
 |         |         |     |                                   |C| 
 +---------+---------+-----+-------------------------------------+ 

 SCHED_TOKEN_RECUR_INTERVAL 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +---------+---------+-----+-----------+---------+---------+-----+ 
 | Duration| Duration|Flags|  Num of   |  Num of |  Num of |   |U| 
 | Hours   | Days    |     |  Minutes  |  Hours  |  Days   |   |T| 
 |         |         |     |           |         |         |   |C| 
 +---------+---------+-----+-------------------------------------+ 

 SCHED_TOKEN_RECUR_WEEKLY 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +---------+---------+-----+-----+-----+-------------------------+ 
 | Duration| Duration|Flags| Week|# of |       Unused          |U| 
 | Hours   | Days    |     | Day |Weeks|                       |T| 
 |         |         |     |     |     |                       |C| 
 +---------+---------+-----+-------------------------------------+ 

 SCHED_TOKEN_RECUR_MONTHLY_BY_WEEKDAY 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +---------+---------+-----+-----+-------+-----+-----------------+ 
 | Duration| Duration|Flags| Week|Num of |Week |     Unused    |U| 
 | Hours   | Days    |     | Day |months |Order|               |T| 
 |         |         |     |     |       |     |               |C| 
 +---------+---------+-----+-------------------------------------+ 

 SCHED_TOKEN_RECUR_MONTHLY_BY_DATE 

  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 
  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 
 +---------+---------+-----+---------+-------+-------------------+ 
 | Duration| Duration|Flags|   Date  |Num of |       Unused    |U| 
 | Hours   | Days    |     |         |months |                 |T| 
 |         |         |     |         |       |                 |C| 
 +---------+---------+-----+-------------------------------------+

Return Values

An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.

For information about handling returned errors, see About Configuration Manager Errors.

Requirements

Runtime Requirements

For more information, see Configuration Manager Server Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Server Development Requirements.

See Also

SMS_ScheduleMethods Server WMI Class
ReadFromString Method in Class SMS_ScheduleMethods