Scheduler Service Method Sample
Copy
The method executed by the Scheduler service must be a server-side method within Aras Innovator. Your method must return a result as shown in the following sample:
Innovator inn = this.getInnovator();
//set time of execution
Item schedServ = inn.newItem("variable","merge");
schedServ.setAttribute("where","[variable].name='Scheduler Execute Time'");
schedServ.setProperty("name","Scheduler Execute Time");
schedServ.setProperty("value",DateTime.UtcNow.ToString());
schedServ=schedServ.apply();
//must return a new Result after execution of service
if(schedServ.isError())
{
return inn.newResult("Scheduler Failed");
}
return inn.newResult("OK");
Note
It is recommended to make the Methods OS agnostic to use them with different operating systems. The main incompatibility issues in operating systems that need to be considered when implementing the method are related to file path case-sensitivity, file path separators, OS-specific line-endings, OS-specific code. For more information about cross-platform development please see section “Cross-platform development” in “Aras Innovator 37 - Programmer’s Guide” document.