IFsrmFileManagementJob interface

[This interface is supported for compatibility but it's recommended to use the FSRM WMI Classes to manage FSRM. Please see the MSFT_FSRMFileManagementJob class.]

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

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

The following methods return this interface:

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.

Members

The IFsrmFileManagementJob interface inherits from IFsrmObject. IFsrmFileManagementJob also has these types of members:

Methods

The IFsrmFileManagementJob interface has these methods.

MethodDescription
AddNotification

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

Cancel

Cancels the job if it is running.

CreateCustomAction

Creates a new custom action.

CreateNotificationAction

Creates a notification action of a specific type and associates it with the notification value.

CreatePropertyCondition

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

DeleteNotification

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

EnumNotificationActions

Enumerates the actions associated with a notification value.

ModifyNotification

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

Run

Runs the job.

WaitForCompletion

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

 

Properties

The IFsrmFileManagementJob interface has these properties.

PropertyAccess typeDescription

CustomAction

Read-only

The action to execute when all the conditions are met and custom action is enabled.

DaysSinceFileCreated

Read/write

The minimum number of days that must elapse from when the file was created to meet the conditions for the job.

DaysSinceFileLastAccessed

Read/write

The minimum number of days that must elapse from when the file was last accessed to meet the conditions for the job.

DaysSinceFileLastModified

Read/write

The minimum number of days that must elapse from when a file was last modified to meet the conditions for the job.

Enabled

Read/write

Indicates whether the job is allowed to run.

ExpirationDirectory

Read/write

The root directory that will contain the expired files.

FileNamePattern

Read/write

A condition property: wildcard filter for names.

Formats

Read/write

The formats of the report to generate when the job is run.

FromDate

Read/write

The date from which the file management operation should be executed.

LastError

Read-only

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

LastReportPathWithoutExtension

Read-only

The path and file name (without extension) of the last report.

LastRun

Read-only

The last time the file management job was run.

Logging

Read/write

The types of logging to perform.

MailTo

Read/write

The email addresses to which to send the reports, if any.

Name

Read/write

The name of the file management job.

NamespaceRoots

Read/write

An array of local directory paths that will be scanned when the file management job is run.

Notifications

Read-only

The list of notifications to perform before the operation is performed.

OperationType

Read/write

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

Parameters

Read/write

The file management job parameters.

PropertyConditions

Read/write

A list of property conditions configured for the job.

ReportEnabled

Read/write

Indicates whether the job will generate a report when it is run.

RunningStatus

Read-only

The running status of the job.

Task

Read/write

The name of the scheduled task associated with the job.

 

Remarks

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:

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").

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2

Header

Fsrm.h (include FsrmPipeline.h, FsrmQuota.h, FsrmReports.h, or FsrmScreen.h)

DLL

SrmSvc.dll

IID

IID_IFsrmFileManagementJob is defined as 0770687e-9f36-4d6f-8778-599d188461c9

See also

IFsrmObject
FSRM Interfaces
MSFT_FSRMFileManagementJob

 

 

Show: