BackgroundJobsManager.Execute

Syntax:

Execute(<MethodName>, <Parameters>, <Key>, <Description>)

Parameters:

<MethodName> (required)

Type: String.
The name of exported procedure or a function of a non-global general module which could be performed at the server, in the ModuleName.MethodName form.

<Parameters> (optional)

Type: Array.
Array of parameters passed to the method. Number and types of parameters should correspond to the method parameters.
All passed parameters should support serialization. Otherwise, an exception is generated and the background job will not be launched.
If last parameters of the method have default values, it is allowed not to set them in the array.
If all method parameters have default values, the array does not need to be transferred.

<Key> (optional)

Type: String.
Job key. If this key is set, it should be unique among keys of the active background job, which have the same method's name as current background job does.

<Description> (optional)

Type: String.
Task description.

Returned value:

Type: BackgroundJob.

Description:

Initiates background job execution. Job is executed on behalf of current user. Execution is done without waiting for job completion. If job key is specified, it must be unique among active job keys.
When transferring unserialized values as method parameters, an exception is given and a background job will not be launched.
In file-based version only one background job at a time is possible. With a background job being executed, new jobs are queued but their execution starts once the previous job is complete.
When working with file base through COM connection or external connection, background jobs will not be executed. A job is added to the queue, but it will not be launched.
In background job, the method can not be executed.

Availability:

Server, thick client, external connection, Mobile application (server).

    

1C:Enterprise Developer's Community