I am trying to use Cloud Scheduler to schedule a Cloud Function (HTTP target) on a weekly basis.
Unfortunately, when I try to force a run the function, I get this error:
{
httpRequest: {
status: 500
}
insertId: "op2w2lfi2zmuu"
jsonPayload: {
@type: "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished"
jobName: "projects/my-project-id/locations/us-central1/jobs/my-job-name"
status: "INTERNAL"
targetType: "HTTP"
url: "https://my-http-trigger.a.run.app/"
}
logName: "projects/my-project-id/logs/cloudscheduler.googleapis.com%2Fexecutions"
receiveTimestamp: "2023-05-16T12:37:06.594694219Z"
resource: {
labels: {3}
type: "cloud_scheduler_job"
}
severity: "ERROR"
timestamp: "2023-05-16T12:37:06.594694219Z"
}
Some details about my scheduler job:
- service account running the job is properly set up and has cloud run invoker role
- Auth Header is OIDC token
- Audience is set up as the following: https://my-http-trigger.a.run.app/
- Ingress Settings of my cloud functions are Allow All Connections
see details the cloud scheduler execution
I was expecting the cloud scheduler run to have a success status (as my cloud function is running without errors) but I got status of last execution = failed