This topic contains 5 replies, has 0 voices, and was last updated by BrettKnights 6 years, 10 months ago.
-
AuthorPosts
-
January 17, 2018 at 4:17 am #18178
LaakiHello!
I was wondering, is there any way to “multi-thread” scheduled scripts?
Now, the problem is this. I have a huge amount of records in need to transform.
I have created the list and started to do the transforms in a loop (with a single scheduled script that spawns a new scheduled script when usage is used). And this will take forever…
I have tried several ways to do threading. I have created two versions of the scheduled script with different input parameters and different deployments.
Example:
Code:
var taskOne = task.create({ taskType: task.TaskType.SCHEDULED_SCRIPT, scriptId: “customscript_script_a”, deploymentId: null, params: { custscript_params_a: masterArrayFirstHalf } });
var taskOneId = taskOne.submit();
var taskTwo = task.create({ taskType: task.TaskType.SCHEDULED_SCRIPT, scriptId: “customscript_script_b”, deploymentId: null, params: { custscript_params_b: masterArraySecondHalf } });
var taskTwoId = taskTwo.submit();NetSuite still puts them in a row, so that they do not run at the same time.
I tried Map reduce function and it took the same amount of time as one scheduled script.
So, letยดs say a single scheduled script does 100 transformations in a minute. Two scheduled scripts running at the same time would do 200 transformations in a minute.
Is there a way to achieve this?
This is a cached copy. Click here to see the original post. -
January 17, 2018 at 11:54 am #18179
leacelosacolumnaHi Laaki, this is only possible if the account you are testing with have multiple queues. Multiple queues are obtained by purchasing a SuiteCloud Plus license.
-
January 18, 2018 at 3:56 am #18180
LaakiThank you suitecloudfanatic for your response.
-
January 23, 2018 at 11:03 am #18181
pcutlerAlso, with 2018.1, every account will be upgraded to having 2 “processors.” So check your upgrade date in the new release portal, this should be available in your account soon. Once its available, you can remove the queue reference from a script deployment record and the script deployment record will run in the first available queue. Just make sure to test in sandbox before making this change in production!
-
January 23, 2018 at 12:16 pm #18182
rnedelkowOn a related note, this video highlights 2018.1 platform changes including the 2 SuiteCloud processors.
-
January 23, 2018 at 2:29 pm #18183
BrettKnightsWill SuiteCloud Plus still have 5 and control?
Also one way to get quite parallal is to script CSV imports.
If your mods are amenable to CSVs then your scheduled script might be able to generate csv files to submit to the CSV processor. I’ve done that where I was scripting a nightly update of around 36k records and it worked pretty well (i.e. it didn’t tie up all our script queues and the updates finished in the “closed” period of the day)
-
AuthorPosts
You must be logged in to reply to this topic.