Skip to content
Visit Workers on GitHub
Set theme to dark (⇧+D)



A ScheduledEvent is the event type for scheduled requests to a Worker. It is the Object passed through as the event when a Worker's scheduled addEventListener() is invoked by a Worker's Cron Trigger.


addEventListener("scheduled", event => {


  • event.cron string

    • The value of the Cron Trigger that started the ScheduledEvent.
  • event.type string

    • The type of event. This will always return "scheduled".
  • event.scheduledTime number

    • The time the ScheduledEvent was scheduled to be executed in milliseconds since January 1, 1970, UTC. It can be parsed as new Date(event.scheduledTime)


When a Workers script is invoked by a Cron Trigger, the Workers runtime starts a ScheduledEvent which will be handled by the event listener registered for the type "scheduled". The event handler can invoke the following methods of the event object to control what happens next:

  • event.waitUntil(promisePromise) void
    • Use this method to notify the runtime to wait for asynchronous tasks (e.g. logging, analytics to third-party services, streaming and caching). The first event.waitUntil to fail will be observed and recorded as the status in the Cron Trigger Past Events table. Otherwise, it will be reported as a Success.