PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05/07/2019 11:12 AM by  GWilkins
Automated Job Recovery
 6 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages
GWilkins
Business Systems Analyst II
Private
Basic Member
(10 points)
Basic Member
Posts:4


Send Message:

--
05/03/2019 12:52 PM

    Currently Lawson 10 - Windows/SQL

    My site currently has a VB Script monitoring the job queue using jqstatus -hrw
    The current monitor works, but we are hoping to get some additional functionality out of it and IPA/ProcessFlow is where we have decided to house the new setup. 

     

    I am trying to build a branch for any job in a 34-Needs Recovery status, which will then automatically recover that job. Thankfully the volume here is infriquent for recovery jobs and is typically an ED502 or RQ500 that recovers without issue, but we'd like to at least begin the recovery so that an analyst has a little more time to VPN in and check the run status of the job.

    I found the below SQL snippet, but I have only every used the QUEUEDJOB table to force close a couple "ghost" jobs that were actually closed, but stuck in a 0-Running status. I wasn't sure if forcing the status to 30-Waiting would cause a true recovery/initialization of the job, or if the job would just sit out in limbo and never actually run. I also wasn't sure if this would cause issues dependent on where the job went into needing recovery.

    UPDATE GENDB.lawson.QUEUEDJOB
    SET STATUS = 30,
    QJBSET12_SS_SW = 'N',
    QJBSET6_SS_SW = 'N',
    QJBSET7_SS_SW = 'N',
    QJBSET8_SS_SW = 'Y',
    QJBSET9_SS_SW = 'Y'
    WHERE STATUS = 34

    from https://www.lawsonguru.com/Articles/View/tabid/346/ArticleId/447/Mass-Job-Recovery.aspx

    I also considered using an AGS call, but I couldn't quite figure out the path and didn't see anything in the IPD transaction builder that was immediately recognizable.

    Appreciate any and all assistance with this.

    Bob WCHN
    System Integ Spec IV
    Private
    Basic Member
    (14 points)
    Basic Member
    Posts:6


    Send Message:

    --
    05/03/2019 1:29 PM

    I have a Process Flow that checks Jobs and Recovers and Kills them (Invalid Parameters Staus jobs aren't going to recover).

    I do it easily with SysCmd Nodes using the jqstatus -wr to get the Job List and then jqaction -r to recover a job and jqaction -k to kill a Job.

    Jimmy Chiu
    System Analyst
    Federal Government
    Veteran Member
    (1879 points)
    Veteran Member
    Posts:639


    Send Message:

    --
    05/03/2019 2:15 PM
    After you queried the QUEUEDJOB table for status 34, you can assign the jobname and jobnumber to variables. Use a webrun node to recover the job if you want to do it from IPA. You can email notifications etc also. 

    /lawson-ios/action/RecoverQueuedJob?jobName=queryNode_JOBNAME&jobNumber=queryNode_JOBNUMBER

    put < and > around the variables.

    <!--queryNode_JOBNUMBER-->
    GWilkins
    Business Systems Analyst II
    Private
    Basic Member
    (10 points)
    Basic Member
    Posts:4


    Send Message:

    --
    05/03/2019 3:07 PM
    Thank you both for the quick response.

    I will take a look at both approaches and see which one I want to implement into my flow. Both are going into my notes though!
    Alex Tsekhansky
    Private
    Private
    Veteran Member
    (243 points)
    Veteran Member
    Posts:81


    Send Message:

    --
    05/06/2019 9:54 AM
    Also I suggest implementing a mechanism that tracks how many times you recover a specific job. A job that failed recovery will probably require manual intervention. We implemented logic for one of our clients where a failed job that auto-recovered before will result in an e-mail sent to a Lawson admin.
    You are not authorized to post a reply.
    Page 1 of 212 > >>