SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
JobModify Script not getting stored correctly

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
JobModify Script not getting stored correctly
Author Message
Bryan Denney



Joined: 10 Nov 2005
Posts: 1

Post JobModify Script not getting stored correctly Reply with quote

I'm have a job that creates another job and the JobModify is cutting of the script after 500 characters. I've checked the "MyScript" and "MyScriptFile" with a MessageBox and it is all there. It just doesn't get stored in the job itself. Any ideas?

CreateDynamicJob:
==============================
Dim MyJobNumber, number
Dim MyScript, string
Dim MyScriptFile, string
FileReadAll "C:\\24x7\\Script-Data\\SyncScript.txt", MyScriptFile
MessageBox MyScriptFile
ConcatEx "Dim( MySystem, string, \"ems_test\" )", MyScriptFile, MyScript
MessageBox MyScript
JobCreate MyJobNumber
JobModify MyJobNumber, "Name", "MyAutoCreateScript"
JobModify MyJobNumber, "Schedule_Type", "X"
JobModify MyJobNumber, "JOB_TYPE", "S"
JobModify MyJobNumber, "SCRIPT_TYPE", "JAL"
JobModify MyJobNumber, "SCRIPT", MyScript
//JobRun MyJobNumber

Contents of SyncScript.txt file
===============================

Dim( MyServerList, string, "srv-wvm,srv-mut,srv-okc" )
Dim( MyStatus, boolean, True )
Dim( MyServer, string )
Dim( ServerToProcess, boolean, True )
Dim( MyLogData, string )
GetToken( ",", MyServerList, MyServer )
NotEqual( MyServer, "", ServerToProcess )
LoopWhile( ServerToProcess, ProcessedAllServers )

SyncFieldLincASP MyServer, MySystem, MyStatus

ChooseCase MyStatus, CaseMyStatusFinished

Case True

ConCatEx(MySystem, " syncronized succeeded on server ", MyServer, MyLogData)

LogAddMessageEx( "INFO", 1, "SyncFieldLincASP", MyLogData)

Case False

ConCatEx(MySystem, " syncronization FAILED on server ", MyServer, MyLogData)

LogAddMessageEx( "ERROR", 1, "SyncFieldLincASP", MyLogData)

CaseMyStatusFinished:

GetToken( ",", MyServerList, MyServer )

NotEqual( MyServer, "", ServerToProcess )
ProcessedAllServers:

Thu Nov 10, 2005 12:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: JobModify Script not getting stored correctly Reply with quote

Both script fragment and file look good to me, at least how you got them in the message. I don't know why you get only 500 chars. Consider emailing all files to support, including the complete script for the job creating another job

As a workaround for now you can change the line
JobModify MyJobNumber, "SCRIPT", MyScript

to
FileSave "c:\\temp.jdl", MyScript
JobModify MyJobNumber, "SCRIPT", "@@SCRIPT:C:\\temp.jdl"
JobRun MyJobNumber
FileDelete "c:\\temp.jdl"

: I'm have a job that creates another job and the JobModify is cutting of the
: script after 500 characters. I've checked the "MyScript" and
: "MyScriptFile" with a MessageBox and it is all there. It just
: doesn't get stored in the job itself. Any ideas?

: CreateDynamicJob: ==============================
: Dim MyJobNumber, number
: Dim MyScript, string
: Dim MyScriptFile, string
: FileReadAll "C:\\24x7\\Script-Data\\SyncScript.txt", MyScriptFile
: MessageBox MyScriptFile
: ConcatEx "Dim( MySystem, string, \"ems_test\" )",
: MyScriptFile, MyScript
: MessageBox MyScript
: JobCreate MyJobNumber
: JobModify MyJobNumber, "Name", "MyAutoCreateScript"
: JobModify MyJobNumber, "Schedule_Type", "X"
: JobModify MyJobNumber, "JOB_TYPE", "S"
: JobModify MyJobNumber, "SCRIPT_TYPE", "JAL"
: JobModify MyJobNumber, "SCRIPT", MyScript
: //JobRun MyJobNumber

: Contents of SyncScript.txt file
: ===============================

: Dim( MyServerList, string, "srv-wvm,srv-mut,srv-okc" )
: Dim( MyStatus, boolean, True )
: Dim( MyServer, string )
: Dim( ServerToProcess, boolean, True )
: Dim( MyLogData, string )
: GetToken( ",", MyServerList, MyServer )
: NotEqual( MyServer, "", ServerToProcess )
: LoopWhile( ServerToProcess, ProcessedAllServers )

: SyncFieldLincASP MyServer, MySystem, MyStatus

: ChooseCase MyStatus, CaseMyStatusFinished

: Case True

: ConCatEx(MySystem, " syncronized succeeded on server ", MyServer,
: MyLogData)

: LogAddMessageEx( "INFO", 1, "SyncFieldLincASP",
: MyLogData)

: Case False

: ConCatEx(MySystem, " syncronization FAILED on server ", MyServer,
: MyLogData)

: LogAddMessageEx( "ERROR", 1, "SyncFieldLincASP",
: MyLogData)

: CaseMyStatusFinished: GetToken( ",", MyServerList, MyServer )

: NotEqual( MyServer, "", ServerToProcess )
: ProcessedAllServers:

Thu Nov 10, 2005 1:03 pm 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.