Cron Latest

Scale applications based on a cron schedule.

Availability: v1.5+ Maintainer: Community

Suggest a change

Trigger Specification

This specification describes the cron trigger that scales based on a Cron Schedule.

triggers:
- type: cron
  metadata:
    # Required
    timezone: Asia/Kolkata  # The acceptable values would be a value from the IANA Time Zone Database.
    start: 30 * * * *       # Every hour on the 30th minute
    end: 45 * * * *         # Every hour on the 45th minute
    desiredReplicas: "10"

Parameter list:

  • timezone is one of the acceptable values from the IANA Time Zone Database. The list of timezones can be found in: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Required.
  • start is the cron expression indicating the start of the cron schedule. Required.
  • end is the cron expression indicating the end of the cron schedule. Required.
  • desiredReplicas is the number of replicas to which the resource has to be scaled between the start and end of the cron schedule. Required.

Example

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: cron-scaledobject
  namespace: default
spec:
  scaleTargetRef:
    name: my-deployment
  triggers:
  - type: cron
    metadata:
      timezone: Asia/Kolkata
      start: 30 * * * *
      end: 45 * * * *
      desiredReplicas: "10"


Currently available scalers for KEDA