---
sidebar:
  hidden: true
title: roboto.domain.actions.scheduled_trigger
---
## Module Contents

### ScheduledTrigger

```python
class roboto.domain.actions.scheduled_trigger.ScheduledTrigger(
    record: roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
)
```

`from roboto.domain.actions import ScheduledTrigger`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L110-L634)

A trigger that invokes actions on a recurring schedule, e.g. hourly or daily.

> **Deprecated since version This**
>
> is the legacy trigger model, kept so existing code keeps working. It cannot express triggers made with the current model (several targets, agent or Slack targets, platform events beyond files and datasets) and will be removed. Use [`roboto.domain.triggers.Trigger`](/reference/python-sdk/roboto/domain/triggers/trigger#roboto.domain.triggers.trigger.Trigger), which reads and edits every trigger.

Schedules are currently specified using standard Cron expressions, with times in UTC. A handful of common schedules are provided by the [`TriggerSchedule`](/reference/python-sdk/roboto/domain/actions/scheduled_trigger#roboto.domain.actions.scheduled_trigger.TriggerSchedule) class.

Once a scheduled time is reached, the action associated with this trigger will be invoked using the optionally provided input specification, and any other overrides such as compute requirements or parameter values.

**Parameters**

- **record** (`roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord`)
- **roboto_client** (`Optional[roboto.http.RobotoClient]`)

**Properties**

- **ScheduledTrigger.action_reference** (`roboto.domain.actions.action_record.ActionReference`): Reference to the action this trigger invokes.

- **ScheduledTrigger.compute_requirement_overrides** (`roboto.domain.actions.action_record.ComputeRequirements | None`): Optional compute requirement overrides.

  Return type: `Optional[roboto.domain.actions.action_record.ComputeRequirements]`

- **ScheduledTrigger.container_parameter_overrides** (`roboto.domain.actions.action_record.ContainerParameters | None`): Optional container parameter overrides.

  Return type: `Optional[roboto.domain.actions.action_record.ContainerParameters]`

- **ScheduledTrigger.created** (`datetime.datetime`): Creation time for this scheduled trigger.

- **ScheduledTrigger.created_by** (`str`): User who created this scheduled trigger.

- **ScheduledTrigger.enabled** (`bool`): True if this scheduled trigger is enabled.

- **ScheduledTrigger.invocation_input** (`roboto.domain.actions.invocation_record.InvocationInput | None`): Optional input specification for action invocations.

  Return type: `Optional[roboto.domain.actions.invocation_record.InvocationInput]`

- **ScheduledTrigger.invocation_upload_destination** (`roboto.domain.actions.invocation_record.InvocationUploadDestination | None`): Optional upload destination for action invocation outputs.

  Return type: `Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination]`

- **ScheduledTrigger.modified** (`datetime.datetime`): Last modification time for this scheduled trigger.

- **ScheduledTrigger.modified_by** (`str`): User who last modified this scheduled trigger.

- **ScheduledTrigger.name** (`str`): This trigger's name, unique among scheduled triggers in the org.

- **ScheduledTrigger.org_id** (`str`): Organization ID which owns this scheduled trigger.

- **ScheduledTrigger.parameter_values** (`dict[str, Any] | None`): Optional action parameter values.

  Return type: `Optional[dict[str, Any]]`

- **ScheduledTrigger.record** (`roboto.domain.actions.scheduled_trigger_record.ScheduledTriggerRecord`): Wire-transmissible representation of this scheduled trigger.

- **ScheduledTrigger.schedule** (`str`): Invocation schedule for the target action.

- **ScheduledTrigger.timeout** (`int | None`): Optional invocation timeout, in minutes.

  Return type: `Optional[int]`

- **ScheduledTrigger.trigger_id** (`str`): Unique ID of the scheduled trigger.

#### ScheduledTrigger.create()

```python
@classmethod
def create(
    name: str,
    schedule: Union[str, TriggerSchedule],
    action_name: str,
    action_owner_id: Optional[str] = None,
    compute_requirement_overrides: Optional[roboto.domain.actions.action_record.ComputeRequirements] = None,
    container_parameter_overrides: Optional[roboto.domain.actions.action_record.ContainerParameters] = None,
    enabled: bool = True,
    invocation_input: Optional[roboto.domain.actions.invocation_record.InvocationInput] = None,
    invocation_upload_destination: Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination] = None,
    parameter_values: Optional[dict[str, Any]] = None,
    timeout: Optional[int] = None,
    caller_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> ScheduledTrigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L131-L237)

Create a new scheduled trigger.

If the trigger is enabled on creation, action invocations will commence on the provided schedule. Note that the total number of active triggers in an organization is subject to a tier-specific limit. Exceeding that limit will result in the trigger being disabled.

**Parameters**

- **name** (`str`): Unique name for the scheduled trigger. Must not exceed 256 characters.
- **schedule** (`Union[str, TriggerSchedule]`): Recurring schedule for the trigger, e.g. hourly.
- **action_name** (`str`): Name of the action to invoke on schedule.
- **action_owner_id** (`Optional[str]`): Organization ID that owns the target action. If not provided, searches the caller's organization.
- **compute_requirement_overrides** (`Optional[roboto.domain.actions.action_record.ComputeRequirements]`): Optional compute requirement overrides for action invocations.
- **container_parameter_overrides** (`Optional[roboto.domain.actions.action_record.ContainerParameters]`): Optional container parameter overrides for action invocations.
- **enabled** (`bool`): Whether the trigger should be active immediately after creation.
- **invocation_input** (`Optional[roboto.domain.actions.invocation_record.InvocationInput]`): Optional input specification to be used for all scheduled action invocations.
- **invocation_upload_destination** (`Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination]`): Optional upload destination for invocation outputs. Currently supports datasets.
- **parameter_values** (`Optional[dict[str, Any]]`): Optional parameter values to pass to the action when invoked.
- **timeout** (`Optional[int]`): Optional timeout override for action invocations, in minutes.
- **caller_org_id** (`Optional[str]`): Organization ID to create the trigger in. Defaults to caller's org.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Roboto client instance. If not provided, defaults to the caller's Roboto configuration.

**Returns**

- `ScheduledTrigger`: The newly created `ScheduledTrigger` instance.

**Raises**

- `ValueError`: If request parameters have invalid values, e.g. a negative timeout.
- [`RobotoInvalidRequestException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): If the request cannot be satisfied as provided.
- [`RobotoUnauthorizedException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoUnauthorizedException): If the caller lacks permission to create triggers, invoke the specified action or upload to the specified upload destination.
- [`RobotoConflictException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException): If a scheduled trigger with the provided name already exists in the target organization.
- [`RobotoLimitExceededException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoLimitExceededException): If the caller has exceeded their organization's maximum action timeout limit (in minutes).

**Usage**

Create an hourly trigger to invoke an analytics action with no explicit inputs:

```python
from roboto.domain.actions import ScheduledTrigger, TriggerSchedule
scheduled_trigger = ScheduledTrigger.create(
    name="analytics_action_hourly_trigger",
    action_name="analytics_action",
    schedule=TriggerSchedule.hourly(),
)
```

Create a daily trigger to invoke an action that processes CSV files created after a given date:

```python
from roboto.domain.actions import ScheduledTrigger, TriggerSchedule, InvocationInput
scheduled_trigger = ScheduledTrigger.create(
    name="csv_processor_daily_trigger",
    action_name="csv_processor",
    schedule=TriggerSchedule.daily(),
    invocation_input=InvocationInput.file_query("created > '2025-04-05' AND path LIKE '%.csv'"),
)
```

#### ScheduledTrigger.delete()

```python
def delete() -> None
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L434-L440)

Delete this scheduled trigger.

**Returns**

- `None`

#### ScheduledTrigger.disable()

```python
def disable() -> None
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L442-L453)

Disable this scheduled trigger.

If the trigger is already disabled, the call has no effect.

Any currently running scheduled invocations will proceed to completion, but no new scheduled invocations will occur, unless and until the trigger is re-enabled.

**Returns**

- `None`

#### ScheduledTrigger.enable()

```python
def enable() -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L455-L471)

Enable this scheduled trigger.

If the trigger is already enabled, the call has no effect.

The total number of active triggers within an organization is subject to a tier-specific limit. If this operation results in the limit being exceeded, this trigger will remain disabled.

**Returns**

- `bool`: `True` if the trigger is now enabled, `False` otherwise.

#### ScheduledTrigger.from_id()

```python
@classmethod
def from_id(
    trigger_id: str,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> ScheduledTrigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L240-L271)

Fetch a scheduled trigger by its unique ID.

**Parameters**

- **trigger_id** (`str`): Unique trigger ID.
- **owner_org_id** (`Optional[str]`): Organization ID which owns the trigger. Defaults to caller's org.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Roboto client instance. If not provided, defaults to the caller's Roboto configuration.

**Returns**

- `ScheduledTrigger`: The `ScheduledTrigger` with the provided unique ID.

**Raises**

- [`RobotoNotFoundException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): If no scheduled trigger exists with the provided ID in the target organization.
- [`RobotoUnauthorizedException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoUnauthorizedException): If the caller is not a member of the trigger's target organization.

#### ScheduledTrigger.from_name()

```python
@classmethod
def from_name(
    name: str,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> ScheduledTrigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L274-L305)

Fetch a scheduled trigger by its unique name within an organization.

**Parameters**

- **name** (`str`): Name of the scheduled trigger.
- **owner_org_id** (`Optional[str]`): Organization ID which owns the trigger. Defaults to caller's org.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Roboto client instance. If not provided, defaults to the caller's Roboto configuration.

**Returns**

- `ScheduledTrigger`: The `ScheduledTrigger` with the provided unique name.

**Raises**

- [`RobotoNotFoundException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): If no scheduled trigger exists with the provided name in the target organization.
- [`RobotoUnauthorizedException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoUnauthorizedException): If the caller is not a member of the trigger's target organization.

#### ScheduledTrigger.get_action()

```python
def get_action() -> roboto.domain.actions.action.Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L473-L484)

Get the target [`Action`](/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action) for this scheduled trigger.

**Returns**

- `roboto.domain.actions.action.Action`: The action this trigger invokes on a recurring schedule.

#### ScheduledTrigger.get_evaluations()

```python
def get_evaluations() -> collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L486-L525)

Get the evaluation history for this scheduled trigger.

Under normal circumstances, this trigger's target action will simply be invoked on the configured schedule, for as long as the trigger is enabled. However, it's possible that an error occurs when attempting to invoke the action. In either case, a trigger evaluation record is created to capture the details of what happened.

**Returns**

- `collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]`: A generator that yields [`TriggerEvaluationRecord`](/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerEvaluationRecord) instances, ordered by descending evaluation start time.

#### ScheduledTrigger.get_invocations()

```python
def get_invocations() -> collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L527-L551)

Get the scheduled invocations initiated by this trigger, if any.

**Returns**

- `collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]`: A generator that yields [`Invocation`](/reference/python-sdk/roboto/domain/actions/invocation#roboto.domain.actions.invocation.Invocation) instances for any scheduled invocations kicked off by this trigger. The invocations are ordered from most to least recently created.

#### ScheduledTrigger.update()

```python
def update(
    action_name: Union[str, roboto.sentinels.NotSetType] = NotSet,
    action_owner_id: Union[str, roboto.sentinels.NotSetType] = NotSet,
    compute_requirement_overrides: Union[Optional[roboto.domain.actions.action_record.ComputeRequirements], roboto.sentinels.NotSetType] = NotSet,
    container_parameter_overrides: Union[Optional[roboto.domain.actions.action_record.ContainerParameters], roboto.sentinels.NotSetType] = NotSet,
    enabled: Union[bool, roboto.sentinels.NotSetType] = NotSet,
    invocation_input: Union[Optional[roboto.domain.actions.invocation_record.InvocationInput], roboto.sentinels.NotSetType] = NotSet,
    invocation_upload_destination: Union[Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination], roboto.sentinels.NotSetType] = NotSet,
    parameter_values: Union[Optional[dict[str, Any]], roboto.sentinels.NotSetType] = NotSet,
    schedule: Union[str, TriggerSchedule, roboto.sentinels.NotSetType] = NotSet,
    timeout: Union[Optional[int], roboto.sentinels.NotSetType] = NotSet,
) -> ScheduledTrigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L553-L634)

Update this scheduled trigger.

Changing the action associated with this trigger, or the default upload destination, are subject to authorization checks. Enabling the trigger or changing the target action's timeout are subject to tier-specific organization limit checks.

Per Roboto convention, the sentinel value `NotSet` is the default for all arguments to this call, indicating that the corresponding trigger attribute should not be updated. The value `None`, on the other hand, indicates that the relevant trigger attribute should be set to `None` (i.e. cleared).

**Parameters**

- **action_name** (`Union[str, roboto.sentinels.NotSetType]`): Name of the target action to associate with this trigger.
- **action_owner_id** (`Union[str, roboto.sentinels.NotSetType]`): Organization ID that owns the target action.
- **compute_requirement_overrides** (`Union[Optional[roboto.domain.actions.action_record.ComputeRequirements], roboto.sentinels.NotSetType]`): Optional compute requirement overrides for action invocations.
- **container_parameter_overrides** (`Union[Optional[roboto.domain.actions.action_record.ContainerParameters], roboto.sentinels.NotSetType]`): Optional container parameter overrides for action invocations.
- **enabled** (`Union[bool, roboto.sentinels.NotSetType]`): Whether the trigger should be active immediately after creation.
- **invocation_input** (`Union[Optional[roboto.domain.actions.invocation_record.InvocationInput], roboto.sentinels.NotSetType]`): Optional input specification to be used for all scheduled action invocations.
- **invocation_upload_destination** (`Union[Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination], roboto.sentinels.NotSetType]`): Optional upload destination for invocation outputs.
- **parameter_values** (`Union[Optional[dict[str, Any]], roboto.sentinels.NotSetType]`): Optional parameter values to pass to the action when invoked.
- **schedule** (`Union[str, TriggerSchedule, roboto.sentinels.NotSetType]`): Recurring schedule for the trigger, e.g. hourly.
- **timeout** (`Union[Optional[int], roboto.sentinels.NotSetType]`): Optional timeout override for action invocations, in minutes.

**Returns**

- `ScheduledTrigger`: This trigger with any updates applied.

**Raises**

- `ValueError`: If request parameters have invalid values, e.g. a negative timeout.
- [`RobotoInvalidRequestException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): If the request cannot be satisfied as provided.
- [`RobotoUnauthorizedException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoUnauthorizedException): If the caller lacks permission to invoke the specified action or upload to the specified upload destination.
- [`RobotoLimitExceededException`](/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoLimitExceededException): If the caller has exceeded their organization's maximum action timeout limit (in minutes).

### TriggerSchedule

```python
class roboto.domain.actions.scheduled_trigger.TriggerSchedule(cron_string: str)
```

`from roboto.domain.actions import TriggerSchedule`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L54-L107)

Utility for defining trigger schedules.

**Parameters**

- **cron_string** (`str`)

**Properties**

- **TriggerSchedule.cron_string** (`str`): Cron string representing the schedule.

#### TriggerSchedule.cron()

```python
@classmethod
def cron(cron_string: str) -> TriggerSchedule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L60-L74)

Create a trigger schedule based on a Cron expression.

**Parameters**

- **cron_string** (`str`): A Cron expression like \*/30 \* \* \* \*.

**Returns**

- `TriggerSchedule`: A [`TriggerSchedule`](/reference/python-sdk/roboto/domain/actions/scheduled_trigger#roboto.domain.actions.scheduled_trigger.TriggerSchedule) instance.

**Raises**

- `ValueError`: If the provided string is not a valid Cron expression.

#### TriggerSchedule.daily()

```python
@classmethod
def daily() -> TriggerSchedule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L83-L86)

Every day at midnight UTC.

**Returns**

- `TriggerSchedule`

#### TriggerSchedule.hourly()

```python
@classmethod
def hourly() -> TriggerSchedule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L77-L80)

Every hour on the hour.

**Returns**

- `TriggerSchedule`

#### TriggerSchedule.monthly()

```python
@classmethod
def monthly() -> TriggerSchedule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L95-L98)

Every 1st of the month at midnight UTC.

**Returns**

- `TriggerSchedule`

#### TriggerSchedule.weekly()

```python
@classmethod
def weekly() -> TriggerSchedule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/scheduled_trigger.py#L89-L92)

Every Sunday at midnight UTC.

**Returns**

- `TriggerSchedule`
