SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
How can I force a job status to fail?
Goto page Previous  1, 2
 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
How can I force a job status to fail?
Author Message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Change the Batch script to

Code:
@ECHO
IF NOT EXIST C:\Users\....user path goes here...\Desktop\test.txt GOTO PRINT_ERROR
ECHO File not found
EXIT 0

:PRINT_ERROR
ECHO ERROR
EXIT 1


Then the previously referenced solution will work for you

Code:
var runInfo = Process.runAndWait("C:\\path\\to\\file\\mybatch.bat", 0);
if(runInfo.getOutput().indexOf("ERROR") >= 0)
     makeJobFail;  // this invalid command will make the job to fail

Wed Oct 15, 2014 8:59 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
Goto page Previous  1, 2
Page 2 of 2

 
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.