Skip to main content

ScheduleClientAsync

Sub-client for managing a specific schedule.

Provides methods to manage a specific schedule, e.g. get, update, or delete it. Obtain an instance via an appropriate method on the ApifyClientAsync class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClientAsync

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistryAsync

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

delete

  • async delete(): None

get

get_log

update

  • async update(*, cron_expression, is_enabled, is_exclusive, name, actions, description, timezone, title): Schedule

  • Parameters

    • optionalkeyword-onlycron_expression: str | None = None

      The cron expression used by this schedule.

    • optionalkeyword-onlyis_enabled: bool | None = None

      True if the schedule should be enabled.

    • optionalkeyword-onlyis_exclusive: bool | None = None

      When set to true, don't start Actor or Actor task if it's still running from the previous schedule.

    • optionalkeyword-onlyname: str | None = None

      The name of the schedule to create.

    • optionalkeyword-onlyactions: list[dict] | None = None

      Actors or tasks that should be run on this schedule. See the API documentation for exact structure.

    • optionalkeyword-onlydescription: str | None = None

      Description of this schedule.

    • optionalkeyword-onlytimezone: str | None = None

      Timezone in which your cron expression runs (TZ database name from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

    • optionalkeyword-onlytitle: str | None = None

      A human-friendly equivalent of the name.

    Returns Schedule

    The updated schedule.

Properties

resource_id

resource_id: str | None

Get the resource ID.