I'm trying to call node file.js
with Bluemix Workload Scheduler every morning; file.js is in the root of my node.js project; file.js is not my server file. I used to use cron but it seems like "BlueMix doesn't have a concept of cron jobs."
As result for the (only) step of my process, I got "node : command not found"
I think I missed something. Is it even possible to do this with Workload Scheduler or should I find alternative options?
MORE INFORMATION
I'm trying to do :
var wls = new WorkloadService(credentials);
var wp = new WAProcess("MyProcessName", "DescriptionProcess");
wp.addStep(new CommandStep("node file.js", myAgentName));
wp.addTrigger( TriggerFactory.repeatDaily(1) );
wls.createAndEnableTask(wp, function(res){
wls.runTask(res.id, function(){console.log("Process is created and started.")});
});
I can see in "IBM Workload Automation on Cloud - Application Lab" that the process is created and started. A few later, process has failed saying "node command not found"
I think i read in the documentation that the agent can only call local system commands (such as cat, pwd ... ) or commands that interact with outside (for REST services call). So there's no way it can find node command or file.js.
Unless I install everything on the agent ? Documentation says we can install programs in /home/wauser/workspace
directory by using curl command. Is that how I should proceed ?