Hi all, is there a way to force schedule script to...
# suitescript
k
Hi all, is there a way to force schedule script to run on demand for testing?
Copy code
/**
 *@NApiVersion 2.1
 *@NScriptType ScheduledScript
 */

import { EntryPoints } from "N/types";
import log from "N/log";

async function execute(context: EntryPoints.Scheduled.executeContext) {
  if (context.type !== context.InvocationType.ON_DEMAND) return;
  try {
    log.debug("Hello World", "I'm an on demand scheduled script");
  } catch (e) {
    log.error("Error", e);
  }
  return "Hello World";
}

export = {
  execute,
};
b
use the save and execute button on the script deployment
k
gotcha, thank you!