Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
    • Overview
    • Container
    • Invoking a container
    • Runtime environment
    • Networking
    • Mounting external resources to a container file system
    • Long-lived containers
    • Container termination notifications
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Yandex Cloud Logging
      • Trigger for Yandex IoT Core
      • Trigger for budgets
      • Trigger for Data Streams
      • Email trigger
    • Dead Letter Queue
    • Container logs
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Cron expression format
  • Possible field values
  • Special characters
  • Examples of cron expressions
  • Roles required for timers to run correctly
  • Timer message format
  • See also
  1. Concepts
  2. Trigger
  3. Timer

Timer that invokes a Serverless Containers container

Written by
Yandex Cloud
Updated at December 11, 2024
  • Cron expression format
    • Possible field values
    • Special characters
    • Examples of cron expressions
  • Roles required for timers to run correctly
  • Timer message format
  • See also

Timer is a trigger that invokes a Serverless Containers container on a schedule. The schedule is entered as a cron expression. The cron expression uses Coordinated Universal Time (UTC).

A timer needs a service account to invoke a container.

For more information about creating a timer, see Creating a timer that invokes a Serverless Containers container.

Cron expression formatCron expression format

The order of fields in the cron expression: Minutes Hours Day-of-month Month Day-of-week Year.

Possible field valuesPossible field values

Note

Special characters used, as well as the names of months and days of the week, are case-insensitive: MON is the same as mon.

Field
name
Required
field
Acceptable
values
Special
characters
supported
Minutes Yes 0-59 ,, -, *, /
Hours Yes 0-23 ,, -, *, /
Day of month Yes 1-31 ,, -, *, ?, /, L, W
Month Yes 1-12,
JAN-DEC
,, -, *, /
Day of week Yes 1-7,
SUN-SAT
,, -, *, ?, /, L, #
Year No empty, 1970-2099 ,, -, *, /

Special charactersSpecial characters

You can use the following special characters in cron expressions:

  • *: Select all values in the field.

    The * character in the Minutes field: The trigger starts every minute.

  • ?: Select any field value. You can't fill Day of month and Day of week at the same time. If you entered a value in one of these fields, enter ? in the other field.

    10 in Day of month and ? in Day of week: The trigger is launched every 10th day of the month.

  • -: Select a range of values.

    The 10-12 range in Hours: the trigger runs at 10 AM, 11 AM, and noon.

  • ,: Select multiple values.

    MON,WED,FRI in the Day of week field: the trigger runs on Monday, Wednesday, and Friday.

  • /: Increment the value.

    0/15 in the Minutes field: The trigger starts at 0, 15, 30, and 45 minutes past each hour.

  • L: This character functions differently in the two fields where it's used:

    • In the Day of month field, it means the last day of the month.
    • In the Day of week field, it means the last day of the week, 7 (Saturday, SAT).

    L in the Day of month field: the trigger runs on January 31, February 28, and so on.

  • W: Select the weekday nearest to the specified date.

    15W in the Day of month field: The trigger is run on the weekday nearest to the 15th day of the month. If the 15th day is Saturday, the trigger runs on Friday the 14th.

    Note

    The characters L and W in the Day of month field can be also merged into LW: The trigger is run on the last weekday of the month.

  • #: Select the Nth day of the month.

    The value 6#3 in the Day of week field: The trigger runs on the third Friday of the month (6 — Friday, 3 — the third Friday of the month).

Examples of cron expressionsExamples of cron expressions

Cron expression Description
* * * * ? * The trigger is run every minute.
0 * ? * * * The trigger is run every hour.
15 10 ? * * * The trigger is run every day at 10:15 AM.

Roles required for timers to run correctlyRoles required for timers to run correctly

  • To create a timer, you need a permission for the service account under which the timer executes the operation. This permission comes with the iam.serviceAccounts.user and editor roles or higher.
  • To enable a timer, the service account needs the serverless.containers.invoker role for the folder with the container to be invoked by the timer.

Read more about access management.

Timer message formatTimer message format

After the trigger is activated, it sends the following message to the container:

{
  "messages": [
    {
      "event_metadata": {
        "event_id": "a1s41g2n5g0o********",
        "event_type": "yandex.cloud.events.serverless.triggers.TimerMessage",
        "created_at": "2019-12-04T12:05:14.227761Z",
        "cloud_id": "b1gvlrnlei4l********",
        "folder_id": "b1g88tflru0e********"
      },
      "details": {
        "trigger_id": "a1sfe084v4se********",
        "payload": "payload-message"
      }
    }
  ]
}

See alsoSee also

  • Timer that invokes a Cloud Functions function
  • Timer that sends messages to WebSocket connections

Was the article helpful?

Previous
Overview
Next
Trigger for Message Queue
© 2025 Direct Cursus Technology L.L.C.