SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
JAl job gets hung up in queue after it is finished
Goto page 1, 2  Next
 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
JAl job gets hung up in queue after it is finished
Author Message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post JAl job gets hung up in queue after it is finished Reply with quote
Having issues with a schedule job (jal), when testing the job (debug) it runs just fine but when it is run normally the job gets hung in the queue when it is finished. I can see that it is finished by: 1) the files have been moved and 2) it is no longer showing up in the task manager. It also cannot be “killed”; the only way to get it out of the queue is to stop the 24x7 service.
Version 5.1.395

CODE: Archive Files By Date

Dim no_more Boolean
Dim complete Boolean
Dim rtn Boolean
Dim fertn Boolean
Dim ctdate String
Dim formdate String
Dim source_files String
Dim full_file_name String
Dim file_list String
Dim new_folder String
Dim file_name String
Dim archivefolder String

// Source Folder include double back slashed at the end of the path
Dim source_folder String "C:\\test\\"

SEARCH:
// Search the source folder for files
ConcatEx source_folder, "*.*", source_files
Dir source_files, file_list
IsEqual file_list, "", no_more
IfThen no_more, COPY

COPY:
// Get file list from folder and get file date
LoopUntil no_more, DONE
GetToken ",", file_list, file_name
IsEqual file_name, "", complete
IfThen complete, DONE
ConcatEx source_folder, file_name, full_file_name
FileDate full_file_name, ctdate
Format(ctdate, "yyyy-mm-dd", formdate)

BACKUPLOGS:
// Check for the backup folder and create it if missing
ConcatEx source_folder, formdate, archivefolder
IsDir archivefolder, rtn
If rtn, DIR_OK, DIR_MAKE

DIR_OK:
GoTo COPYFILE

DIR_MAKE:
DirCreate archivefolder

COPYFILE:
ConcatEx (archivefolder, "\\", file_name, new_folder)
Filemove full_file_name, new_folder

DONE:
Exit
Fri Sep 27, 2013 10:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Do you see JAL.EXE process in the task manager after the job completes?

If you set timeout property for the job, is the scheduler able to clear the job from its queue after the specified timeout time?
Fri Sep 27, 2013 11:46 am View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
No the jal.exe process in task manager is no longer there when the job completes.

In order to use the “time out” function the job has to be run in “detached process” which is not our standard. Plus the job will vary depending on the amount of files to be moved. It takes about 25 minutes to move four thousand files.

For testing purposes I did as requested and used a different queue, the job “finished” in 26 minutes and the time out was set for 30 minutes, and after 33 minutes the job was still showings as RUNNING in the job monitor.
Fri Sep 27, 2013 12:33 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
Correction:
Version 5.1 Build 405
JVM Version 1.6.0_17-b04
Fri Sep 27, 2013 12:48 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Generally speaking all jobs should run detached there only very few exceptions to that rule.

Back to the issue, please enable tracing in scheduler options, and rerun the job. After job completion review debug.log file and let us know if you see any errors or exceptions there.
Fri Sep 27, 2013 12:48 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
Here is what I found in the debug.log

2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - waitForProcess(): end
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : exit code: 0
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : Enumeration found [0]
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - Writing output file E:\24x7\Output\400\400_20130927122323.out
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.AbstractJobRunner - isFailed(...) : output:
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - killProcess start
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.ProgramJobRunner - runJob(): end
2013-09-27 12:23:23,278 [Thread-38638] INFO com.softtreetech.jscheduler.business.runner.AbstractJobRunner$TimeoutVerifier - run():

2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.JALScriptJobRunner - Deleting workfile E:\24x7\Queue\48085.tmp
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.javascript.JavaScriptCommand - Start: execFileExists
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.javascript.JavaScriptCommand - File: E:\24x7\Queue\48085.tmp.err
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.javascript.JavaScriptCommand - Start: execFileExists
2013-09-27 12:23:23,278 [Job #400 - ArchiveFilesByDate] DEBUG com.softtreetech.jscheduler.business.runner.javascript.JavaScriptCommand - File: E:\24x7\Queue\48085.tmp.out
Fri Sep 27, 2013 1:13 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
No smoking gun as fur as I can tell.

Please try one more thing for me, disable output capturing option in the job, rerun it and see if that helps.
Fri Sep 27, 2013 2:42 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
Disabled the capture, rebooted the server and let the job run as scheduled, still hangs up in the queue.
Mon Sep 30, 2013 11:04 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Well, we know now it's not a logging conflict, the job process must be leaving some resources open.
Can you please add to the end of your JAL job scrip the following commands instead of Exit

Dim pid
JobProcessID pid
ProcessKill pid
Mon Sep 30, 2013 12:44 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
The first run ended with an error: An error occurred while executing automation script Line 52: Invalid datatype.

The Dim statement needs a Datatype, I used datatype “Number”, same results; 1) the files have been moved and 2) it is no longer showing up in the task manager and the JOB shows as RUNNING in the Queue.
Mon Sep 30, 2013 3:44 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Sorry I forgot to add the data type.

Does the job have any notifications and/or other on finish actions
Mon Sep 30, 2013 4:13 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
Yes,
Send e-mail message:
Job Start
Job Finish
Job Error

I get the e-mail on the start of the job and on an error but not on the finish.
Mon Sep 30, 2013 4:21 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Let's temporarily disable them to ensure that is not a factor.
Mon Sep 30, 2013 5:34 pm View user's profile Send private message
MightyMouse



Joined: 27 Sep 2013
Posts: 16

Post Reply with quote
Disabled the all the e-mail notifications – same results.
Created a new job – copied the JAL from notepad – same results.
Tue Oct 01, 2013 10:46 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6502

Post Reply with quote
Just to be certain, other JAL jobs work fine, this is the only JAL job having difficulties, correct?
Tue Oct 01, 2013 12:31 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
Goto page 1, 2  Next
Page 1 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.