Skip to content

Latest commit

 

History

History
 
 

schedules

Schedules

Schedules are for scheduling Workflows to be run at specific times in the future.

In this sample, a reminder Workflow (src/workflows.ts) is scheduled to run every 10 seconds with:

You can see each Workflow Execution in the UI:

Screenshot of the Workflows page of the Temporal Web UI

You can interact with the running Schedule using these scripts:

Running this sample

  1. temporal server start-dev to start Temporal Server.
  2. npm install to install dependencies.
  3. npm run start.watch to start the Worker.
  4. In another shell, npm run schedule.start to start the Schedule.

It should output:

Started schedule 'sample-schedule'.

The reminder Workflow will run and log from the Worker every 10 seconds.

You can now run:

  npm run schedule.go-faster
  npm run schedule.pause
  npm run schedule.unpause
  npm run schedule.delete