Skip to main content

Cron

Cron-based automation schedule for use with Trigger.

Attributes

AttributeTypeDescription
expressionstrCron expression string (e.g., "0 * * * *") using the standard five-field format to define the automation schedule.
timezoneTimezone = UTCTimezone 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

NameTypeDescription
expressionstrCron expression string (e.g., "0 * * * *").
timezoneTimezone = "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

TypeDescription
stringThe combined string containing the timezone assignment and the cron expression (e.g., 'CRON_TZ=UTC 0 * * * *').