Skip to main content
POST
/
functions
/
schedules
Python SDK
import os
from cognite.client.data_classes import ClientCredentials
schedule = client.functions.schedules.create(
    name="My schedule",
    function_id=123,
    cron_expression="*/5 * * * *",
    client_credentials=ClientCredentials("my-client-id", os.environ["MY_CLIENT_SECRET"]),
    description="This schedule does magic stuff.",
    data={"magic": "stuff"},
)

schedule = client.functions.schedules.create(
    name="My schedule",
    function_id=456,
    cron_expression="*/5 * * * *",
    description="A schedule just used for some temporary testing.",
)
{
  "items": [
    {
      "id": 4503599627370496,
      "name": "My schedule",
      "createdTime": 1730204346000,
      "cronExpression": "* * * * *",
      "when": "Every hour",
      "sessionId": "<string>",
      "description": "This is a nice schedule",
      "functionId": 4503599627370496,
      "functionExternalId": "my.known.id"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json
items
Funtion Schedule · object[]
required
Required array length: 1 element

Response

Created

items
Funtion Schedule · object[]
required
Last modified on April 23, 2026