I have a job (Job1) that runs every minute in a Job Queue which posts journal entries. There is another job (Job2) that runs at the end of the day which locks the ledger table. When that happens Job Queue for Job1 crashes and the Job Queue Status gets updated to Error.
I'd like Job1 to run only if it the ledger table is not locked by another process. LOCKTABLE does not have return value for me to use a guarded IF. Try Function does not accept LOCKTABLE. Can someone recommend a workaround?
Appreciate any help.