Cron
Cron-based automation schedule for use with Trigger.
Attributes
| Attribute | Type | Description |
|---|---|---|
| expression | str | Cron expression string (e.g., "0 * * * *") using the standard five-field format to define the automation schedule. |
| timezone | Timezone = UTC | Timezone for the cron schedule, which must be a standard timezone value like "US/Eastern" or "Europe/London". |
Constructor
Signature
def Cron(
expression: str,
timezone: Timezone = "UTC"
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| expression | str | Cron expression string (e.g., "0 * * * *"). |
| timezone | Timezone = "UTC" | Timezone for the cron schedule. One of the standard timezone values (e.g., "US/Eastern", "Europe/London"). |
Methods
timezone_expression()
@classmethod
def timezone_expression() - > string
Returns the cron schedule formatted with a timezone prefix compatible with systems that require the CRON_TZ variable.
Returns
| Type | Description |
|---|---|
string | The combined string containing the timezone assignment and the cron expression (e.g., 'CRON_TZ=UTC 0 * * * *'). |