The BITS commands serve to manage downloads and uploads of files can be managed with the BITS (Background Intelligent Transfer Service). The downloads/uploads are managed as individual jobs. When transferring files, the BITS automatically performs load balancing to ensure that productive work with power resources can continue without reducing performance.
To perform a download or upload of files with BITS, you need at least the commands Add job, Add file(s), Resume job and Complete job. All other commands can be used optionally.
Since the BITS is a relatively new service, the correct usage of these commands depends on the respective operating system of the clients. For compatibility reasons, please read the article at: http://msdn.microsoft.com/en-us/library/aa363167(VS.85).aspx
For more information about the BITS, please read the article at: http://msdn.microsoft.com/en-us/library/bb968799(VS.85).aspx
With this command, you can create a new BITS job. You can perform such a download or upload via the BITS only through this job.
First specify if the job should manage a download or an upload. BITS can execute an upload job only from a single file. Then you give a unique name to the job.
Last, you create a selected variable. The job ID is saved in this variable. With this ID, additional BITS command can access this job and manage it. |
With this command you can assign files that are to be transferred to a job. These files are later loaded down from or up to a server by means of the job.
First, specify the job ID of the job to which you want to assign the files. You then specify the local storage location and the storage location on a server for each file. In doing so, you mus also enter the file name on the destination system.
With the adjacent buttons you can add or remove additional files. |
This command starts a job, which then transfers the specified files (see Add file(s) to job). To do this, you first have to specify the job ID of the corresponding job. You then have two options available:
|
This command ensures that the specified job (via job ID) is properly terminated. It should always be executed at the end of a job to avoid complications with the BITS. |
With this command, you can cancel a job. Simply enter the job ID of the corresponding job. All commands which subsequently refer to the job, which is cancelled with this command, will report an error, because the job no longer exists. The Complete job command must not be running. |
With this command, you can interrupt the execution of a job. Simply enter the job ID of the corresponding job. However, the job can be resumed at any time with the Resume job command. |
With this command, you will receive an information about the current priority of the specified job (job ID). The priority is saved as the integer value in a variable to be specified, which can take the following values:
0 = In front, 1 = High, 2 = Normal, 3 = Low |
With this command, you can assign a new priority to the specified job (job ID). You can do this by selecting the corresponding priority (In front, High, Normal, Low) from a drop-down list. By default the priority is normal. |
With this command, you can save various information about the specified job (job ID) in a variable. The variable then contains the following data:
The data can be accessed through the variable in the following format:
|
With this command you can read the notification parameters, which may have been used for a job (see Set notify command line). To do this, enter the job ID of the job, the parameters of which you want to read. The data is stored in a program variable and a parameter variable that you must specify. Due to the architecture of the BITS, the content of the program variable is repeated in quotation marks at the start, which is then followed by the parameters. |
With this command you can specify a local program or a script or client command, which is automatically launched as soon as the job reaches the status BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSFERED.
If you have to make a distinction between the two states, you must do so manually in the appropriate program/script or the specified client command, because BITS itself makes no distinction. For this, you can transfer the job ID as a parameter to the program/script or the client command. With the help of the BITSAdmin tool, you can then query the last status via the job ID. You may need an additional script, which can make the distinction and then launches the actual program.
|
With this command you can transfer credentials to the job, if this information is required for the server or for a proxy.
First specify if the credentials are intended for a server or a proxy. Multiple credentials can be used when files are loaded from different servers.
To enter the credentials correctly, choose the scheme of the application (Basic, Digest, NTLM, Negotiate or Passport). Then, you specify a user name and a password.
|
With this command you can delete the credentials for a job. To do this, you specify the job ID. Then select whether the data are credentials for a server or a proxy. Finally select the schema, the information of which should be deleted. |
With this command you can iterate all BITS jobs are iterated loop-like. In doing so, the job ID as well as the job name are saved in each iteration for the respective current job in the matching variables. In addition, you have to indicate if the only the jobs of the current user or the jobs of all users should be iterated. With the subordinate commands you can further process the information. |
With this command you can iterate all files (Add file(s) to job) of a job (job ID). The file path and file name of the local file and the server file will then be saved in the corresponding variable. With the subordinate commands you can further process the information. |
Last change on 10.03.2014