Category : google-cloud-functions

I have been trying to add setScheduleTime to the cloud task. I have done the following: use GoogleCloudTasksV2CloudTasksClient; use GoogleCloudTasksV2HttpMethod; use GoogleCloudTasksV2HttpRequest; use GoogleCloudTasksV2Task; class CreateRandomCloudTasksForLot { putenv(‘GOOGLE_APPLICATION_CREDENTIALS=/service-account.json’); $client = new CloudTasksClient(); $queueName = $client->queueName($this->projectID, $this->location, $this->queue); $httpRequest = new HttpRequest(); $httpRequest->setUrl(‘https://europe-west1-myproject.cloudfunctions.net/mybidfunction?id=1’); $httpRequest->setHttpMethod(HttpMethod::GET); if (isset($payload)) { $httpRequest->setBody($payload); } // Create a Cloud Task object. $task ..

Read more