function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ahmed kishk 9ahmed kishk 9 

Queueable job has been created but I can't find it Apex Jobs view or by querying AsyncApexJob object

Hello All,

I have ocausinally Callout time out while calling a webservice. I have created a queuable job to retry my request whenever exception occurs. Below is my exception handling and the code that I used to create Queueable job:
try{
// APEX Call out
}catch(System.CalloutException e){
            CQCLocationImporterQueueable retryJob = new CQCLocationImporterQueueable(pageUri);
            ID jobID = System.enqueueJob(retryJob);   
            throw new applicationException('Callout Exception has been occured while calling CQC API. retry job has been created with Id:' + jobID); 
        }catch(applicationException e){
            CQCLocationImporterQueueable retryJob = new CQCLocationImporterQueueable(pageUri);
            ID jobID = System.enqueueJob(retryJob);   
            throw new applicationException('Callout Exception has been occured while calling CQC API. retry job has been created with Id:' + jobID); 
        }
My BatchJob has failed with Status Detail:

First error: Callout Exception has been occured while calling CQC API. retry job has been created with Id:7078E00000P2XlE

However I could not find the job with specified Id 7078E00000P2XlE in Apex Jobs view or by querying AsyncApexJob object.
 
SELECT Id, Status, NumberOfErrors FROM AsyncApexJob where Id = '7078E00000P2XlE'

I have tested my code in Anonymous Window and it got executed successfuly and the Queueable Job has been created sucessfully. So what I have missed in my code?

Thanks,
Ahmed Kishk
Best Answer chosen by ahmed kishk 9
JayyyJayyy
This is quite too late. But, for anyone who has this question. You should check the Queueable jobs in 'Scheduled Jobs' in UI or CronTrigger through Query editor.

All Answers

JayyyJayyy
This is quite too late. But, for anyone who has this question. You should check the Queueable jobs in 'Scheduled Jobs' in UI or CronTrigger through Query editor.
This was selected as the best answer
ahmed kishk 9ahmed kishk 9
Thansk Jayyy. better late than never :)