Cloud Scheduler publishes logs at the start of each execution and at the end
of each execution. You can retrieve, view, and analyze the logs for a specific
job, including the
[audit logs that are available for Cloud Scheduler](https://docs.cloud.google.com/scheduler/docs/audit-logging).

To view logs, follow these steps:

1. In the Google Cloud console, go to the **Cloud Scheduler** page.


   [Go to Cloud Scheduler](https://console.cloud.google.com/cloudscheduler)

   <br />

2. In the row of the job that you want to view the logs for,
   click **Actions** \>
   **View logs**.

   The Logs Explorer page opens and lets you display log entries,
   parse and analyze them, and specify query parameters.

   To learn more about viewing logs in Logging, see
   [View logs by using the Logs Explorer](https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface).

### Sample queries

| Query description | Expression |
|---|---|
| Cloud Scheduler type and method | ```sql resource.type="audited_resource" protoPayload.methodName=~"google.cloud.scheduler.v1.CloudScheduler.*" ``` |
| Cloud Scheduler log name | ```sql logName=("projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Factivity" OR "projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fdata_access" OR "projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fsystem_event" OR "projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fpolicy") protoPayload.serviceName="cloudscheduler.googleapis.com" ``` |