IBITSExtensionSetup::GetCleanupTaskName method (bitscfg.h)
Use the GetCleanupTaskName method to retrieve the name of the cleanup task associated with the virtual directory.
Syntax
HRESULT GetCleanupTaskName(
[out] BSTR *pTaskName
);
Parameters
[out] pTaskName
Null-terminated string containing the name of the cleanup task associated with the virtual directory. If NULL, BITS has not created a cleanup task for the virtual directory. When done, call the SysFreeString function to free pTaskName.
Return value
This method returns S_OK for success. Otherwise, the method returns S_FALSE if a task name has not been specified for the virtual directory.
Remarks
When you create a virtual directory and enable it for BITS uploads, BITS adds a work item in the Task Scheduler. The work item cleans up the virtual directory once every 12 hours by deleting jobs that have not been modified within the time-out period. To specify the time-out period, set the BITSSessionTimeout IIS extension property.
Use the pTaskName name as an input parameter to the Schtasks.exe executable file, which you can use to change the properties of the cleanup task from a script.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2003 |
Target Platform | Windows |
Header | bitscfg.h |
DLL | BitsMgr.dll |
Redistributable | BITS 1.5 on Windows XP |