Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCP Cloud Scheduler throws ERROR for a HTTP targettype

I have created a GCP Cloud Scheduler job to run every 15 minutes. It is supposed to call an API from my Node js application. In the console the job definition looks like this:

Description: A job
Frequency: */15 * * * *
Timezone: Central Standard Time
Target: HTTP
URL: https://<company url>/api/email-reminder/
HTTP method: GET
Auth header: Add OIDC token
Service account: [email protected]

When it runs it returns the following in the logs:


httpRequest: {
 }
 insertId: "15wxxxxxxge1lv"  

jsonPayload: {
  @type: "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished"   
  jobName: "projects/<project name>/locations/us-central1/jobs/xxxxxxxxx-scheduler-emailreminders-1"   
  status: "UNKNOWN"   
  targetType: "HTTP"   
  url: "https://<company url>/api/email-reminder/"   
 }
 logName: "projects/<project name>/logs/cloudscheduler.googleapis.com%2Fexecutions"  
 receiveTimestamp: "2019-11-14T04:45:50.280446452Z"  

resource: {

labels: {…}   
  type: "cloud_scheduler_job"   
 }
 severity: "ERROR"  
 timestamp: "2019-11-14T04:45:50.280446452Z"  
}

How do I find out more information about the error?

like image 563
Bill Soranno Avatar asked Jan 25 '23 13:01

Bill Soranno


1 Answers

The default value for timeout scheduler jobs process is 180s, you can change vía gcloud command

gcloud scheduler jobs update http my-super-job --attempt-deadline 540s

As well you can see the complete info of your jobs with this commands...

gcloud scheduler jobs list
gcloud scheduler jobs describe my-super-job
like image 149
Orlando Rodriguez Avatar answered Feb 11 '23 23:02

Orlando Rodriguez