 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
Job ran fine in debug mode, does not run in Test or Normal |
|
I have a job using JAL. The job ran fine in debug mode when I step through the script. However, when I run the job in Test or Normal mode, the job does Not seem to do anything. What is prohibiting my job to run in Normal mode? JAL is pasted as follows:
//If Topnotch Download is manually run, be sure the close the Download process.
//Upon closing the Download process, the download.log finishes writing and saving.
//Also if you manually run, the Topnotch Download application needs to be closed.
//Upon closing, the download.exe will stop and close, which is necessary for this
//script to run successfully as designed.
//If the Topnotch Download is run automatically, this script will work without
//manual intervention.
Dim timeTime_now, time
Dim boolTime_is_to_run, boolean
Dim boolDownload, boolean
Dim numDownload_run_id, number
Dim boolDoneForTodayExists, boolean
Dim boolDownloadLogExists, boolean
//Check if file exists for later use
FileExists("D:\Topnotch Download\Download\Automation\CheckDownloadDone\DoneForToday.txt", boolDoneForTodayExists)
//Evaluate whether or not the time now is between 03:59 AM to 04:01 AM, checking for 4:00 AM.
//At first check at 4:00 AM, delete file DoneForToday.txt.
//The earliest that download.exe can start, set by schedule, is 3:00 AM.
//download.exe for Bank 140 takes at least 1 hour 30 minutes to run.
Now(timeTime_now)
IsTimeBetween( timeTime_now, 03:59, 04:01, boolTime_is_to_run )
IfThen(boolTime_is_to_run, DONEFORTODAYEXISTS)
Goto FINDDOWNLOADDONESUCCESS
FINDDOWNLOADDONESUCCESS:
//Explanation: When download.exe starts, download.log file is created, and actively being written to.
//When download.exe is finished, download.log is also done writing. Therefore, check to see
//when download.exe is not running, and the download.log exists. But, if DoneForToday.txt exists,
//then do not check again for the success in download.log.
//See if the download.exe is running.
IsTaskRunning("download.exe", boolDownload)
//See if download.log exisits.
FileExists("D:\Topnotch Download\Download\download.log", boolDownloadLogExists)
//To do: If download.exe is Not running, and download.log exists, then
//run CheckTNDownloadDone.bat
//If download.exe is running, then Exit.
IfThen(boolDownload, DOEXIT)
IfThen(boolDownloadLogExists, RUNCHECK)
Goto DOEXIT
RUNCHECK:
IfThen(boolDoneForTodayExists, DOEXIT)
//To do: change the following line to use RunandWait function.
//RunAndWait("cmd /C CheckTNDownloadDone.bat", "D:\\Topnotch Download\\Download\Automation\\CheckDownloadDone", 0, numDownload_run_id)
Run("cmd /C CheckTNDownloadDone.bat", "D:\\Topnotch Download\\Download\Automation\\CheckDownloadDone", numDownload_run_id)
Goto DOEXIT
DONEFORTODAYEXISTS:
//If file DoneForToday.txt exists, then delete the file.
IfThen(boolDoneForTodayExists, DELDONEFORTODAY)
Goto DOEXIT
DELDONEFORTODAY:
FileDelete("D:\Topnotch Download\Download\Automation\CheckDownloadDone\DoneForToday.txt")
//Insert line to clear the boolDownloadLogExists so that the FINDDOWNLOADDONESUCCESS
//can run freshly.
Set boolDoneForTodayExists, ""
Goto FINDDOWNLOADDONESUCCESS
DOEXIT:
Exit
|
|
Fri Sep 26, 2008 5:28 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
I don't see anything in the script providing any clues. Here is what I would do to troubleshoot this job.
Enable tracing options in the Tools/Options menu; Log tab; "Trace Enabled" option. Let the job run normally. Evaluate the script.log or job specific log file (see the C:\Proggram Files\24x7 Automation 3\Data subfolder)
Use the queue monitor to check the job actually started and the queue is not clogged by some other job(s).
Please let us know what you get in the script.log
|
|
Fri Sep 26, 2008 5:40 pm |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
The trace log was pasted as follows. The job ran fine after Trace was on, and I restarted 24x7 Scheduler. I then turned Trace off, and restarted the Scheduler, and the job ran fine. It looked like all that was needed was to restart 24x7 Scheduler to clear out what ever caused the problem, like maybe values stored in cache. If you have comments on why restarting the Scheduler proved to resolve my problem, I'd be interested to understand what might have happened. Otherwise, I'm go to go. Thank you very much & have a great weekend.
**** 9/26/2008 12:45:39 ****
9: DIM
9: Executing DIM("TIMETIME_NOW", "TIME")
10: DIM
10: Executing DIM("BOOLTIME_IS_TO_RUN", "BOOLEAN")
11: DIM
11: Executing DIM("BOOLDOWNLOAD", "BOOLEAN")
12: DIM
12: Executing DIM("NUMDOWNLOAD_RUN_ID", "NUMBER")
13: DIM
13: Executing DIM("BOOLDONEFORTODAYEXISTS", "BOOLEAN")
14: DIM
14: Executing DIM("BOOLDOWNLOADLOGEXISTS", "BOOLEAN")
17: FILEEXISTS
17: Executing FILEEXISTS("D:\Topnotch Download\Download\Automation\CheckDownloadDone\DoneForToday.txt", "false")
Return "false"
23: NOW
23: Executing NOW("00:00:00")
Return "12:45:39"
24: ISTIMEBETWEEN
24: Executing ISTIMEBETWEEN("12:45:39", "03:59:00", "04:01:00", "false")
Return "false"
25: IFTHEN
25: Executing IFTHEN("false", "DONEFORTODAYEXISTS")
26: GOTO
28: Executing GOTO("FINDDOWNLOADDONESUCCESS")
35: ISTASKRUNNING
35: Executing ISTASKRUNNING("download.exe", "false")
Return "false"
37: FILEEXISTS
37: Executing FILEEXISTS("D:\Topnotch Download\Download\download.log", "false")
Return "true"
42: IFTHEN
42: Executing IFTHEN("false", "DOEXIT")
43: IFTHEN
43: Executing IFTHEN("true", "RUNCHECK")
47: IFTHEN
47: Executing IFTHEN("false", "DOEXIT")
50: RUN
50: Executing RUN("cmd /C CheckTNDownloadDone.bat", "D:\Topnotch Download\Download\Automation\CheckDownloadDone", "0")
Return "344"
51: GOTO
65: Executing GOTO("DOEXIT")
66: EXIT
66: Executing EXIT()
|
|
Fri Sep 26, 2008 7:01 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
My guess, in the first place you got something (some other job) blocking the queue to which this job is assigned and so the job never started running. Restarting the scheduler cleared the queue. That's why I suggested in the first place to use the Queue Monitor to check whether the job is waiting for something.
|
|
Sat Sep 27, 2008 12:48 am |
|
 |
merp
Joined: 22 Sep 2008 Posts: 8 Country: United States |
|
|
|
Thank you for explaining and your help.
|
|
Sat Sep 27, 2008 12:49 am |
|
 |
|
|
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
|
|
|