Author |
Message |
kyofm
Joined: 30 Sep 2014 Posts: 21
|
|
24x7 and WinBatch Error 193 |
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7963
|
|
|
|
Try using full command line referencing winbatch executable file and passing script name as a parameter
|
|
Tue Sep 30, 2014 1:09 pm |
|
 |
kyofm
Joined: 30 Sep 2014 Posts: 21
|
|
|
|
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 |
|
 |
kyofm
Joined: 30 Sep 2014 Posts: 21
|
|
|
Tue Oct 07, 2014 9:03 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7963
|
|
|
|
Thank you for the status update.
The embedded job script should have
 |
 |
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 |
|
 |
|