SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
24x7 and WinBatch Error 193

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
24x7 and WinBatch Error 193
Author Message
kyofm



Joined: 30 Sep 2014
Posts: 21

Post 24x7 and WinBatch Error 193 Reply with quote
I am trying to run a WinBatch script inside 24x7 Scheduler v 5.2 Build 417 on Windows 7 and am getting the following error in the log:

Create process error. Extended error: Cannot run program "L:\Library\BatchJobs\make-all-files.wbt":
CreateProcess error=192, %1 is not a valid Win32 application.

I have successfully run the WinBatch script outside of 24x7 on the same machine. Also the same script ran fine in 24x7 v 3.4.25e on Windows XP.

Is WinBatch still supported in v.5? What am I missing?

Thanks in advance.
Tue Sep 30, 2014 11:21 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6500

Post Reply with quote
Try using full command line referencing winbatch executable file and passing script name as a parameter
Tue Sep 30, 2014 1:09 pm View user's profile Send private message
kyofm



Joined: 30 Sep 2014
Posts: 21

Post Reply with quote
I think I am running into issues not specifically related to WinBatch now.

While testing I re-wrote the script in VBScript using the built-in editor in 24x7 and received two errors in the log after running the job. If I run the script outside of 24x7 it works with no problems.

Error 1. An error occurred while executing automation script: Error #0: Unknown error
Error 2. Job completed with exit code 1. This exit code does not satisfy job exit code condition. Job failed.

This is the VBScript I am trying to run:

Dim accessObject
Set accessObject = createObject("Access.Application")

accessObject.openCurrentDatabase("L:\Library\AccessDatabases\Overnight.accdb")
accessObject.DoCmd.RunMacro "starter"

'Scheduler generates L:\Library\batchjobs\completed\onite.txt when done processing

accessObject.Quit

I have also tried to run a simple message box in VBScript embedded in 24x7 (Code: MsgBox "Hello") and if I try to validate the code inside 24x7's editor I get an error that says "Line 0 not null".

Is something not set up correctly in 24x7 install or on the machine?
Tue Oct 07, 2014 7:36 am View user's profile Send private message
kyofm



Joined: 30 Sep 2014
Posts: 21

Post Reply with quote
I solved the VBScript issue by registering the vb24x7.dll in the command prompt http://www.softtreetech.com/support/phpBB2/viewtopic.php?t=23848&highlight=vbscript.

Quote:
Run the command prompt as an Administrator and register the vb24x7.dll (C:\24x7>regsvr32 vb24X7.dll)


I have given up on using WinBatch.
Tue Oct 07, 2014 9:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6500

Post Reply with quote
Thank you for the status update.

The embedded job script should have
Code:
Sub Main
  ...
End sub


The scheduler is looking for sub Main as an entry point when running and when debugging scripts.
Tue Oct 07, 2014 9:23 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.