ScheduleCollectionClient
Hierarchy
- ResourceClient
- ScheduleCollectionClient
Index
Methods
Properties
Methods
__init__
Initialize the resource client.
Parameters
keyword-onlybase_url: str
API base URL.
keyword-onlypublic_base_url: str
Public CDN base URL.
keyword-onlyhttp_client: HttpClient
HTTP client for making requests.
keyword-onlyresource_path: str
Resource endpoint path (e.g., 'actors', 'datasets').
keyword-onlyclient_registry: ClientRegistry
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
create
Create a new schedule.
https://docs.apify.com/api/v2#/reference/schedules/schedules-collection/create-schedule
Parameters
keyword-onlycron_expression: str
The cron expression used by this schedule.
keyword-onlyis_enabled: bool
True if the schedule should be enabled.
keyword-onlyis_exclusive: bool
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[str, Any]] | 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
Title of this schedule.
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns Schedule
The created schedule.
iterate
Iterate over the available schedules.
Simple
listdoes only one API call, possibly not listing all items matching the criteria. This method returns an iterator that is capable of making multiple API calls to retrieve all items matching the criteria.https://docs.apify.com/api/v2#/reference/schedules/schedules-collection/get-list-of-schedules
Parameters
optionalkeyword-onlylimit: int | None = None
How many schedules to retrieve.
optionalkeyword-onlyoffset: int | None = None
What schedules to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the schedules in descending order based on their modification date.
optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns Iterator[ScheduleShort]
list
List the available schedules.
https://docs.apify.com/api/v2#/reference/schedules/schedules-collection/get-list-of-schedules
Parameters
optionalkeyword-onlylimit: int | None = None
How many schedules to retrieve.
optionalkeyword-onlyoffset: int | None = None
What schedules to include as first when retrieving the list.
optionalkeyword-onlydesc: bool | None = None
Whether to sort the schedules in descending order based on their modification date.
optionalkeyword-onlytimeout: Timeout = 'medium'
Timeout for the API HTTP request.
Returns ListOfSchedules
The list of available schedules matching the specified filters.
Properties
resource_id
Get the resource ID.
Sub-client for the schedule collection.
Provides methods to manage the schedule collection, e.g. list or create schedules. Obtain an instance via an appropriate method on the
ApifyClientclass.