Workload Scheduler for Node.js script - is it equivalent to cron jobs in Bluemix? -


i'm trying call node file.js bluemix workload scheduler every morning; file.js in root of node.js project; file.js not server file. used use cron seems "bluemix doesn't have concept of cron jobs."

as result (only) step of process, got "node : command not found"

i think missed something. possible workload scheduler or should find alternative options?

more information

i'm trying :

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 created , started.")}); }); 

i can see in "ibm workload automation on cloud - application lab" process created , started. few later, process has failed saying "node command not found"

i think read in documentation agent can call local system commands (such cat, pwd ... ) or commands interact outside (for rest services call). there's no way can find node command or file.js.

unless install on agent ? documentation says can install programs in /home/wauser/workspace directory using curl command. how should proceed ?

you should modify nodejs application let expose method can run using curl command , provides proper output , logging. curl calling method run in workload scheduler job. workload scheduler service not part of node runtime.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -