文件最后提交记录最后更新时间
4 个月前
6 天前
4 个月前
7 个月前
10 个月前
9 个月前
1 个月前
9 个月前
9 个月前
4 个月前
10 个月前
README

Scheduling

Demonstrates how to schedule tasks and execute code at specific times or intervals using Rivet Actors.

Getting Started

git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/scheduling
npm install
npm run dev

Features

  • Task scheduling: Schedule actor actions to run at specific times with schedule.at()
  • Delayed execution: Schedule tasks to run after a delay with schedule.after()
  • Persistent schedules: Scheduled tasks survive actor restarts
  • Action callbacks: Scheduled tasks invoke actor actions with custom payloads

Implementation

This example demonstrates time-based task scheduling in Rivet Actors:

  • Actor Definition (src/backend/registry.ts): Shows how to use schedule.at() and schedule.after() to schedule future actions with persistent state

Resources

Read more about scheduling, actions, and state.

License

MIT