This message was deleted.
# suitescript
s
This message was deleted.
b
whoever wrote this should was not very clever with their looping
Copy code
var index = 1;
var scriptStatus;
do {
  scriptStatus = nlapiScheduleScript(
    "customscript_update_project_task_assign",
    "customdeploy" + index,
    params
  );
  nlapiLogExecution(
    "DEBUG",
    "scheduled script status deployment " + index,
    scriptStatus
  );
  index++;
} while (scriptStatus !== "QUEUED" && index <= 10);
in general, code that has obviously been copy and pasted like this is not good code
otherwise you want to use a ScheduledScriptTask when converting to ss2
a
when using ScheduledScriptTask for 2.0. we do not have an option to check whether it is QUEUED or not right ??
b
you would need a try/catch to catch the error and check the message