Submitting Multiple Deployments of the Same Script

The system does not permit you to submit a single script deployment for processing multiple times simultaneously. If a deployment is already submitted and not finished, you can't submit it again. You have to wait for the unfinished instance to finish.

To submit multiple instances of a script at the same time, create multiple deployments and submit each one as needed.

This approach has several benefits. For instance, you can process multiple script instances in parallel. Additionally, if you need a map/reduce script to be processed multiple times in the same general time frame, you can submit both instances at the same time without having to worry about the second submission failing with an error. The alternative is to monitor the first instance and submit the second one after it finishes.

For on-demand Map/Reduce submissions, create multiple deployments with a status of Not Scheduled and with the Deployed option enabled. When you omit the deployment ID, NetSuite selects an available deployment. A deployment is available only when it has no unfinished instance.

To reduce submission failures, avoid unnecessary or duplicate transaction-triggered submissions. Configure the triggering script or workflow to run only in the execution contexts where the Map/Reduce submission is needed.

The Concurrency Limit controls the number of processors that process a Map/Reduce deployment's work. Separately, NetSuite does not allow multiple unfinished tasks for the same script and deployment.

Note that if a deployment has already been submitted but not yet finished, and you open the deployment record for editing in the UI, the deployment record's Save and Execute option isn't available. If you try to submit it programmatically, you'll get a MAP_REDUCE_ALREADY_RUNNING error.

For help creating or submitting a deployment, see the following topics:

Related Topics

General Notices