The Scheduler checks if the object in the "resources" property is an array. If it isn't, it throws this exception.
You should make sure that you are passing a correct object.
I recommend printing the variable to the console:
var resources = ....; // your object
console.log("resources", resources);
dp.update({resources});
or setting a breakpoint:
var resources = ....; // your object
debugger;
dp.update({resources});
Then use the browser developer tools to inspect the object.