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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Spanner V1 Client - Class CrontabSpec (1.104.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.104.0 (latest)](/php/docs/reference/cloud-spanner/latest/Admin.Database.V1.CrontabSpec)\n- [1.103.0](/php/docs/reference/cloud-spanner/1.103.0/Admin.Database.V1.CrontabSpec)\n- [1.102.0](/php/docs/reference/cloud-spanner/1.102.0/Admin.Database.V1.CrontabSpec)\n- [1.101.0](/php/docs/reference/cloud-spanner/1.101.0/Admin.Database.V1.CrontabSpec)\n- [1.100.0](/php/docs/reference/cloud-spanner/1.100.0/Admin.Database.V1.CrontabSpec)\n- [1.98.0](/php/docs/reference/cloud-spanner/1.98.0/Admin.Database.V1.CrontabSpec)\n- [1.97.0](/php/docs/reference/cloud-spanner/1.97.0/Admin.Database.V1.CrontabSpec)\n- [1.96.0](/php/docs/reference/cloud-spanner/1.96.0/Admin.Database.V1.CrontabSpec)\n- [1.95.0](/php/docs/reference/cloud-spanner/1.95.0/Admin.Database.V1.CrontabSpec)\n- [1.94.0](/php/docs/reference/cloud-spanner/1.94.0/Admin.Database.V1.CrontabSpec)\n- [1.93.1](/php/docs/reference/cloud-spanner/1.93.1/Admin.Database.V1.CrontabSpec)\n- [1.92.1](/php/docs/reference/cloud-spanner/1.92.1/Admin.Database.V1.CrontabSpec)\n- [1.91.0](/php/docs/reference/cloud-spanner/1.91.0/Admin.Database.V1.CrontabSpec)\n- [1.90.0](/php/docs/reference/cloud-spanner/1.90.0/Admin.Database.V1.CrontabSpec)\n- [1.89.0](/php/docs/reference/cloud-spanner/1.89.0/Admin.Database.V1.CrontabSpec)\n- [1.88.0](/php/docs/reference/cloud-spanner/1.88.0/Admin.Database.V1.CrontabSpec)\n- [1.87.0](/php/docs/reference/cloud-spanner/1.87.0/Admin.Database.V1.CrontabSpec)\n- [1.86.0](/php/docs/reference/cloud-spanner/1.86.0/Admin.Database.V1.CrontabSpec)\n- [1.85.0](/php/docs/reference/cloud-spanner/1.85.0/Admin.Database.V1.CrontabSpec)\n- [1.84.0](/php/docs/reference/cloud-spanner/1.84.0/Admin.Database.V1.CrontabSpec)\n- [1.83.0](/php/docs/reference/cloud-spanner/1.83.0/Admin.Database.V1.CrontabSpec)\n- [1.82.0](/php/docs/reference/cloud-spanner/1.82.0/Admin.Database.V1.CrontabSpec)\n- [1.81.0](/php/docs/reference/cloud-spanner/1.81.0/Admin.Database.V1.CrontabSpec)\n- [1.80.0](/php/docs/reference/cloud-spanner/1.80.0/Admin.Database.V1.CrontabSpec)\n- [1.79.0](/php/docs/reference/cloud-spanner/1.79.0/Admin.Database.V1.CrontabSpec)\n- [1.78.0](/php/docs/reference/cloud-spanner/1.78.0/Admin.Database.V1.CrontabSpec)\n- [1.77.0](/php/docs/reference/cloud-spanner/1.77.0/Admin.Database.V1.CrontabSpec)\n- [1.76.1](/php/docs/reference/cloud-spanner/1.76.1/Admin.Database.V1.CrontabSpec)\n- [1.68.0](/php/docs/reference/cloud-spanner/1.68.0/Admin.Database.V1.CrontabSpec)\n- [1.67.0](/php/docs/reference/cloud-spanner/1.67.0/Admin.Database.V1.CrontabSpec)\n- [1.66.0](/php/docs/reference/cloud-spanner/1.66.0/Admin.Database.V1.CrontabSpec)\n- [1.65.0](/php/docs/reference/cloud-spanner/1.65.0/Admin.Database.V1.CrontabSpec)\n- [1.64.0](/php/docs/reference/cloud-spanner/1.64.0/Admin.Database.V1.CrontabSpec)\n- [1.63.2](/php/docs/reference/cloud-spanner/1.63.2/Admin.Database.V1.CrontabSpec)\n- [1.62.1](/php/docs/reference/cloud-spanner/1.62.1/Admin.Database.V1.CrontabSpec)\n- [1.61.0](/php/docs/reference/cloud-spanner/1.61.0/Admin.Database.V1.CrontabSpec)\n- [1.60.0](/php/docs/reference/cloud-spanner/1.60.0/Admin.Database.V1.CrontabSpec)\n- [1.59.0](/php/docs/reference/cloud-spanner/1.59.0/Admin.Database.V1.CrontabSpec)\n- [1.58.4](/php/docs/reference/cloud-spanner/1.58.4/Admin.Database.V1.CrontabSpec)\n- [1.57.0](/php/docs/reference/cloud-spanner/1.57.0/Admin.Database.V1.CrontabSpec)\n- [1.56.0](/php/docs/reference/cloud-spanner/1.56.0/Admin.Database.V1.CrontabSpec)\n- [1.55.0](/php/docs/reference/cloud-spanner/1.55.0/Admin.Database.V1.CrontabSpec)\n- [1.54.2](/php/docs/reference/cloud-spanner/1.54.2/Admin.Database.V1.CrontabSpec) \nReference documentation and code samples for the Cloud Spanner V1 Client class CrontabSpec.\n\nCrontabSpec can be used to specify the version time and frequency at\nwhich the backup should be created.\n\nGenerated from protobuf message `google.spanner.admin.database.v1.CrontabSpec`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Spanner \\\\ Admin \\\\ Database \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getText\n\nRequired. Textual representation of the crontab. User can customize the\nbackup frequency and the backup version time using the cron\nexpression. The version time must be in UTC timezone.\n\nThe backup will contain an externally consistent copy of the\ndatabase at the version time. Allowed frequencies are 12 hour, 1 day,\n1 week and 1 month. Examples of valid cron specifications:\n\n- `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC.\n- `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC.\n- `0 2 * * *` : once a day at 2 past midnight in UTC.\n- `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC.\n- `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.\n\n### setText\n\nRequired. Textual representation of the crontab. User can customize the\nbackup frequency and the backup version time using the cron\nexpression. The version time must be in UTC timezone.\n\nThe backup will contain an externally consistent copy of the\ndatabase at the version time. Allowed frequencies are 12 hour, 1 day,\n1 week and 1 month. Examples of valid cron specifications:\n\n- `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC.\n- `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC.\n- `0 2 * * *` : once a day at 2 past midnight in UTC.\n- `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC.\n- `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.\n\n### getTimeZone\n\nOutput only. The time zone of the times in `CrontabSpec.text`. Currently\nonly UTC is supported.\n\n### setTimeZone\n\nOutput only. The time zone of the times in `CrontabSpec.text`. Currently\nonly UTC is supported.\n\n### getCreationWindow\n\nOutput only. Schedule backups will contain an externally consistent copy\nof the database at the version time specified in\n`schedule_spec.cron_spec`. However, Spanner may not initiate the creation\nof the scheduled backups at that version time. Spanner will initiate\nthe creation of scheduled backups within the time window bounded by the\nversion_time specified in `schedule_spec.cron_spec` and version_time +\n`creation_window`.\n\n### hasCreationWindow\n\n### clearCreationWindow\n\n### setCreationWindow\n\nOutput only. Schedule backups will contain an externally consistent copy\nof the database at the version time specified in\n`schedule_spec.cron_spec`. However, Spanner may not initiate the creation\nof the scheduled backups at that version time. Spanner will initiate\nthe creation of scheduled backups within the time window bounded by the\nversion_time specified in `schedule_spec.cron_spec` and version_time +\n`creation_window`."]]