SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
calling External program- Javascript to customize email msg

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
calling External program- Javascript to customize email msg
Author Message
t_vijay



Joined: 18 Jan 2011
Posts: 2
Country: India

Post calling External program- Javascript to customize email msg Reply with quote
Hi Guys,

Our company purchased 24x7 Scheduler MUlti Platform edition recently. We need to create generic job start and job end message in a newly created Job at the notification events level. We selected Run program & Job Start /Job Finish option to write javascript. But run program not accepts any javascript program. As we cant do using JAL/VBscript as this works only for windows platform.
Is there any specific way to call javascript external program from "Run program" option. Here javascript program sends customized mail message based on job events (start/finish/error).

Or is there any way we can pass @V"event" parameter to another job to achieve the same result.??

Please let us know.. and do the needful.

Many Thanks
Tue Jan 18, 2011 1:06 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Theoretically you can run JavaScripts from command line on any system using command line Java version. I haven't tried that, but the command line may look like
java -classpath "js.jar;jscheduler.jar" org.mozilla.javascript.tools.shell.Main my_javascript_code.js [args here]

Please note that the symbol separating multiple files in the classpath parameter is platform dependent
use ; on Windows systems, use : on *nix and Mac systems

As for passing values between JS jobs, there are many ways. For example, from job A you can write them to a file named jobB.data and from job B read that file. To trigger job B from A use job dependencies, job chaining, or JS calls like
var runId = Scheduler.runJob(125);

here in this example, 125 ias the id of job B
Tue Jan 18, 2011 9:11 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.