Share via


CReplicationSchedule.Description Property

Gets the description of a schedule that is defined for a Commerce Server Staging (CSS) project.

object Description { get; }

Return Value

A string that contains a description of the schedule.

Remarks

The Description for a schedule is automatically defined when the schedule is created. The description is formed by specifying the time and date (for a nonrecurring schedule) or days (for a recurring schedule) on which the replication will run. Some examples of descriptions are as follows:

  • "At 9:00 AM every Mon of every week, starting 2/8/2007"

  • "At 8:30 AM every Mon, Wed, Fri of every week, starting 2/1/2007"

  • "At 11:00 AM on 2/12/2007"

    Note

    Schedules are defined by using the Windows Task Scheduler. To view the descriptions that are defined for a schedule, open the Scheduled Tasks folder on the server where the schedule is defined to run.

The CReplicationSchedule.Description property corresponds to the COM property named ReplicationSchedule.Description.

Example

The following example displays the schedule descriptions that are defined for the Project1 project.

CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");

CReplicationProject replicationProject;
replicationProject = (CReplicationProject)replicationServer.OpenProject("Project1", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);

CReplicationSchedule replicationSchedule;
int iterator = 0;
object i = iterator as object;

Console.WriteLine("The schedule descriptions for Project1 are");

while (true)
{
    try
    {
        replicationSchedule = (CReplicationSchedule)replicationProject.EnumSchedules(ref i);
        Console.WriteLine(replicationSchedule.Description);
    }
    catch (System.Runtime.InteropServices.COMException e)
    {
        // Quit if "No more items" error
        if (e.ErrorCode == -2147422485)
            break;
        else
            throw e;
    }
}

See Also

Other Resources

CReplicationProject.AddSchedule Method

CReplicationProject.EnumSchedules Method

CReplicationSchedule Class