task.ScheduledScriptTask

Note:

The content in this help topic pertains to SuiteScript 2.0.

Object Description

All the properties of scheduled script task in SuiteScript. Use this object to place a scheduled script deployment into the NetSuite scheduling queue.

To use the ScheduledScriptTask Object:

  1. In the NetSuite UI, create the script record and script deployment record.

  2. Use task.create(options) to create the ScheduledScriptTask object.

  3. Use the ScheduledScriptTask object properties to set the script and deployment properties.

  4. Use ScheduledScriptTask.submit() to deploy the scheduled script to the NetSuite scheduling queue.

  5. Use the properties for the task.ScheduledScriptTaskStatus object to get the status of the scheduled script.

For a complete list of this object’s methods and properties, see ScheduledScriptTask Object Members.

For more information about scheduled scripts in NetSuite, see SuiteScript 2.x Scheduled Script Type.

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/task Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/task Module Script Samples.

          //Add additional code 
...
var scriptTask = task.create({
    taskType: task.TaskType.SCHEDULED_SCRIPT
});
scriptTask.scriptId = 1234;
scriptTask.deploymentId = 'customdeploy1';
scriptTask.params = {searchId: 'custsearch_456'};
var scriptTaskId = scriptTask.submit();
...
//Add additional code 

        

Related Topics

N/task Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices