Share via


IFsrmReportScheduler.CreateScheduleTask Method (String, Object, String)

 

Creates a scheduled task that is used to trigger a report job.

Namespace:   Microsoft.Storage
Assembly:  srmlib (in srmlib.dll)

Syntax

void CreateScheduleTask(
    string taskName,
    [InAttribute] ref object namespacesSafeArray,
    string serializedTask
)
void CreateScheduleTask(
    String^ taskName,
    [InAttribute] Object^% namespacesSafeArray,
    String^ serializedTask
)
abstract CreateScheduleTask : 
        taskName:string *
        namespacesSafeArray:Object byref *
        serializedTask:string -> unit
Sub CreateScheduleTask (
    taskName As String,
    <InAttribute> ByRef namespacesSafeArray As Object,
    serializedTask As String
)

Parameters

  • taskName
    Type: System.String

    The name of a Task Scheduler task to create. The string is limited to 230 characters.

  • namespacesSafeArray
    Type: System.Object

    A VARIANT that contains a SAFEARRAY of local directory paths to verify (see Remarks). Each element of the array is a variant of type VT_BSTR. Use the bstrVal member of the variant to set the path.

  • serializedTask
    Type: System.String

    An XML string that defines the Task Scheduler job. For details, see Task Scheduler Schema.

Remarks

To run a report job on a schedule, the value of the taskName parameter and the value of the Task property must be the same.

Specify the same namespaces for this method that you specified for the NamespaceRoots property. This method validates the namespace paths. For validation details, see the Remarks section of VerifyNamespaces. To generate the XML, you can use the Task Scheduler v2.0 interfaces to define the scheduled task; however, the task definition must be v1.0 compatible. (Use the Task Scheduler API to define the task but not to register the task—this method registers the task.) After defining the task, access the ITaskDefinition::XmlText property to get the XML.

Note that FSRM ignores triggers in the XML that FSRM does not support. For the "MONTHLYDOW" trigger, you cannot use the V2 extensions. For example, if you specify "WeeksOfMonth", you can specify only one week of the month and it cannot be the fifth week. Also, for "DaysOfWeek", you can specify only one day.

See Also

FsrmReportScheduler
IFsrmReportScheduler Interface
Microsoft.Storage Namespace

Return to top