IFsrmFileManagementJob Interface

 

Defines a file management job. The job specifies a schedule, conditions, a command or actions to execute if a file meets all the conditions

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

<GuidAttribute("0770687E-9F36-4D6F-8778-599D188461C9")>
Public Interface IFsrmFileManagementJob
	Inherits IFsrmObject

NameDescription
System_CAPS_pubpropertyCustomAction

Retrieves or sets the action to execute when all the conditions are met.

System_CAPS_pubpropertyDaysSinceFileCreated

Retrieves or sets the number of days that have elapsed since the file was created.

System_CAPS_pubpropertyDaysSinceFileLastAccessed

Retrieves or sets the number of days that have elapsed since the file was last accessed.

System_CAPS_pubpropertyDaysSinceFileLastModified

Retrieves or sets the number of days that have elapsed since a file was last modified.

System_CAPS_pubpropertyDescription

Gets and sets the Description property.

System_CAPS_pubpropertyEnabled

Retrieves or sets a value that Indicates whether the job enabled (can run).

System_CAPS_pubpropertyExpirationDirectory

Retrieves or sets the root directory that will contain the expired files.

System_CAPS_pubpropertyFileNamePattern

Retrieves or sets a condition property: wildcard filter for names.

System_CAPS_pubpropertyFormats

Retrieves or sets the formats of the report to generate when the job is run.

System_CAPS_pubpropertyFromDate

Retrieves or sets the date from which you want the file management job to begin expiring files (moving files to the expired files directory). This property also applies to custom commands for the file management job.

System_CAPS_pubpropertyid

Gets the id property.

System_CAPS_pubpropertyLastError

Retrievers the error message from the last time the job was run.

System_CAPS_pubpropertyLastReportPathWithoutExtension

Retrieves the local directory path where the reports were stored the last time the job ran.

System_CAPS_pubpropertyLastRun

Retrieves the last time the file management job was run.

System_CAPS_pubpropertyLogging

Retrieves or sets the types of logging to perform.

System_CAPS_pubpropertyMailTo

Retrieves or sets the email addresses to which to send the reports, if any.

System_CAPS_pubpropertyName

Retrieves or sets the name of the file management job.

System_CAPS_pubpropertyNamespaceRoots

Retrieves or sets an array of local directory paths that will be scanned when the file management job is run.

System_CAPS_pubpropertyNotifications

Retrieves or sets the name of the file management job.

System_CAPS_pubpropertyOperationType

Retrieves or sets the type of file management job. The type determines the operation to perform on a file when all conditions are met.

System_CAPS_pubpropertyParameters

Retrieves or sets the parameters for the file management job.

System_CAPS_pubpropertyPropertyConditions

Retrieves or sets a list of property conditions specified for the job.

System_CAPS_pubpropertyReportEnabled

Retrieves or sets a value that indicates whether the job will generate a report when it runs.

System_CAPS_pubpropertyRunningStatus

Retrieves the running status of the job.

System_CAPS_pubpropertyTask

Retrieves or sets the name of the scheduled task to associate with the job.

NameDescription
System_CAPS_pubmethodAddNotification(Int32)

Adds a new notification value (period) to the file management job's list of notifications.

System_CAPS_pubmethodCancel()

Cancels the job if it is running.

System_CAPS_pubmethodCommit()

Saves the file management job object in the server's list of objects.

System_CAPS_pubmethodCreateCustomAction()

Creates a custom action object.

System_CAPS_pubmethodCreateNotificationAction(Int32, _FsrmActionType)

Creates a notification action and associates it with the notification value.

System_CAPS_pubmethodCreatePropertyCondition(String)

Creates a new property condition and adds it to the collection of property conditions.

System_CAPS_pubmethodDelete()

Removes the file management job object from the server's list of objects.

System_CAPS_pubmethodDeleteNotification(Int32)

Deletes a notification value from the file management job's list of notifications.

System_CAPS_pubmethodEnumNotificationActions(Int32)

Enumerates the actions associated with a notification value.

System_CAPS_pubmethodModifyNotification(Int32, Int32)

Change a notification value in the file management job's list of notifications.

System_CAPS_pubmethodRun(_FsrmReportGenerationContext)

Runs the job.

System_CAPS_pubmethodWaitForCompletion(Int32)

Waits for the specified period of time or until the job has finished running.

To create a file management job, call the IFsrmFileManagementJobManager::CreateFileManagementJob method.

The following methods return this interface:

  1. IFsrmFileManagementJobManager::EnumFileManagementJobs

  2. IFsrmFileManagementJobManager::GetFileManagementJob

If a file management job object is modified using MSFT_FSRMFileManagementJob or a related WMI class, then the methods and properties of the IFsrmFileManagementJob interface may no longer be usable and fail in unexpected ways when working with the same job.

When a file management job runs, it scans the files in the specified folders and if a file in the folder meets the conditions specified by the job, FSRM moves the file to the specified expired files folder if the type is expiration, or runs the custom action if defined. If notifications or actions are specified, FSRM sends the notifications and performs the actions.

Use the following properties to specify the expiration conditions:

  1. DaysSinceFileCreated

  2. DaysSinceFileLastAccessed

  3. DaysSinceFileLastModified

  4. PropertyConditions (use the CreatePropertyCondition method to create the property condition)

  5. FSRM performs a logical AND on all the conditions to determine if the file meets those conditions.

FSRM does not expire files in the system directories (for example, "\Windows", "\System Volume Information", "$Event", and "$Recycle").

Return to top

Community Additions

ADD
Show: