# Cloud Spanner V1 Client - Class CrontabSpec (2.9.0)

2.9.0 (latest) 2.8.1 2.7.0 2.6.1 2.5.1 2.4.1 2.3.0 2.2.0 2.1.0 2.0.1-RC1 1.106.0 1.105.1 1.104.1 1.103.0 1.102.0 1.101.0 1.100.0 1.98.0 1.97.0 1.96.0 1.95.0 1.94.0 1.93.1 1.92.1 1.91.0 1.90.0 1.89.0 1.88.0 1.87.0 1.86.0 1.85.0 1.84.0 1.83.0 1.82.0 1.81.0 1.80.0 1.79.0 1.78.0 1.77.0 1.76.1 1.68.0 1.67.0 1.66.0 1.65.0 1.64.0 1.63.2 1.62.1 1.61.0 1.60.0 1.59.0 1.58.4 1.57.0 1.56.0 1.55.0 1.54.2 Reference documentation and code samples for the Cloud Spanner V1 Client class CrontabSpec.

CrontabSpec can be used to specify the version time and frequency at
which the backup should be created.

Generated from protobuf message `google.spanner.admin.database.v1.CrontabSpec`

## Namespace

Google \\ Cloud \\ Spanner \\ Admin \\ Database \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text` | `string` Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timezone. The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications: \* \* `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC. \* \* `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC. \* \* `0 2 * * *` : once a day at 2 past midnight in UTC. \* \* `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC. \* \* `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC. |
| `↳ time_zone` | `string` Output only. The time zone of the times in `CrontabSpec.text`. Currently only UTC is supported. |
| `↳ creation_window` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`. |

### getText

Required. Textual representation of the crontab. User can customize the
backup frequency and the backup version time using the cron
expression. The version time must be in UTC timezone.

The backup will contain an externally consistent copy of the
database at the version time. Allowed frequencies are 12 hour, 1 day,
1 week and 1 month. Examples of valid cron specifications:

- `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC.
- `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC.
- `0 2 * * *` : once a day at 2 past midnight in UTC.
- `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC.
- `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setText

Required. Textual representation of the crontab. User can customize the
backup frequency and the backup version time using the cron
expression. The version time must be in UTC timezone.

The backup will contain an externally consistent copy of the
database at the version time. Allowed frequencies are 12 hour, 1 day,
1 week and 1 month. Examples of valid cron specifications:

- `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC.
- `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC.
- `0 2 * * *` : once a day at 2 past midnight in UTC.
- `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC.
- `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTimeZone

Output only. The time zone of the times in `CrontabSpec.text`. Currently
only UTC is supported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setTimeZone

Output only. The time zone of the times in `CrontabSpec.text`. Currently
only UTC is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreationWindow

Output only. Schedule backups will contain an externally consistent copy
of the database at the version time specified in
`schedule_spec.cron_spec`. However, Spanner may not initiate the creation
of the scheduled backups at that version time. Spanner will initiate
the creation of scheduled backups within the time window bounded by the
version_time specified in `schedule_spec.cron_spec` and version_time +
`creation_window`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasCreationWindow

### clearCreationWindow

### setCreationWindow

Output only. Schedule backups will contain an externally consistent copy
of the database at the version time specified in
`schedule_spec.cron_spec`. However, Spanner may not initiate the creation
of the scheduled backups at that version time. Spanner will initiate
the creation of scheduled backups within the time window bounded by the
version_time specified in `schedule_spec.cron_spec` and version_time +
`creation_window`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |