ANS-1888 · SUITESCRIPT DEVELOPMENT

How Do NetSuite Script Deployment and Execution Statuses Work?

Understand the lifecycle of scheduled and one-time NetSuite scripts, distinguishing between deployment and individual execution statuses.

Short answer

NetSuite scripts have distinct deployment and execution statuses. A 'Scheduled' deployment indicates recurrence, while 'Not Scheduled' is for one-time runs. Individual executions progress through statuses like 'Pending', 'Processing', and 'Complete', with 'Processing' indicating an active run. Failures can lead to statuses like 'Canceled' or 'Retry'.

Scenario

Users often need to understand the various statuses a NetSuite script can display, particularly when monitoring scheduled tasks or troubleshooting unexpected behavior. Confusion can arise between a script's overall deployment status and the status of its individual executions.

Solution

NetSuite distinguishes between a script's deployment status and the status of its individual executions. Understanding this distinction is crucial for monitoring and troubleshooting.

  1. For Scripts with a 'Scheduled' Deployment Status:

    When a script is configured with a 'Scheduled' deployment status, it indicates a recurring schedule. Upon each trigger, the individual execution status of the script will change to 'Processing'. After successful completion, the execution status will become 'Complete', and the deployment status will remain 'Scheduled', awaiting its next scheduled run. If the script is configured to run only once, its deployment status will change to 'Completed' after its single execution.

  2. For Scripts with a 'Not Scheduled' Deployment Status:

    When a script's deployment status is 'Not Scheduled' (typically for one-time or manually triggered executions), its individual execution status will change to 'Processing' when triggered. Upon successful completion, the execution status will then transition to 'Complete'.

  3. Understanding the 'Processing' Execution Status and Other States:

    If a script's execution status is 'Processing', it signifies that the script is currently active and running. NetSuite script executions can also transition through other statuses such as 'Pending' (awaiting execution), 'Deferred' (temporarily postponed), 'Canceled' (stopped by a user or system), and 'Retry' (attempting re-execution after a transient failure). If a script encounters an error or fails during execution, its status may not revert to 'Scheduled' or 'Complete'. Instead, it might remain in 'Processing' if the failure occurs mid-run, or transition to 'Canceled' or 'Retry' depending on the specific error handling and script configuration.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant