Submitting an On-Demand Map/Reduce Script Deployment from the UI

Map/reduce scripts can be submitted for processing on an on-demand basis from the NetSuite UI. To submit a script in this way, use the Save and Execute command on the Script Deployment page. The Status field on the deployment must be set to Not Scheduled.

You can also submit an on-demand deployment programmatically. For details, see Submitting an On–Demand Map/Reduce Script Deployment from a Script.

Note that after you submit an on-demand deployment of a script, the script does not necessarily execute right away. After a script is submitted for processing, there may be a short system delay before the script is executed, even if no scripts are before it. If there are scripts already waiting to be executed, the script may wait to be executed until other scripts have completed. For more details about how map/reduce scripts are processed, see SuiteCloud Processors.

Note that, regardless of the Status, the system submits the deployment for processing only if the Deployed box is checked. To stop execution of a map reduce script, you must uncheck the Deployed box. For more details on this choice, see Status.

To submit an on-demand map/reduce script for processing from the UI:

  1. Create your map/reduce script entry point script. This process includes uploading a JavaScript file and creating a script record based on that file. To review a map/reduce script example, see SuiteScript 2.x Map/Reduce Script Type. If this script is your first, see SuiteScript 2.x Hello World and SuiteScript 2.x Entry Point Script Creation and Deployment.

  2. Open the appropriate script record in view mode. Click the Deploy Script button.

  3. When the script deployment record loads, check the Deployed box, if it is not already checked.

  4. Set the Status field to Not Scheduled.

  5. Set the remaining body fields. For help understanding the fields, see Map/Reduce Script Deployment Record.

  6. Select Save and Execute from the Save dropdown list.

Note:

In some cases, you may want to submit a map/reduce script for processing multiple times simultaneously, or within a short time frame. However, the system does not permit a script deployment to be submitted if a previous instance of the deployment has already been submitted and is not yet finished. The solution in this case is to create multiple deployments for the script. In other words, repeat Steps 2 through 6 of the procedure above as needed.

Related Topics

Map/Reduce Script Submission
Map/Reduce Script Deployment Record
Scheduling a Map/Reduce Script Submission
Submitting an On–Demand Map/Reduce Script Deployment from a Script
Submitting Multiple Deployments of the Same Script

General Notices