Scheduled Zambdas
We will cover what scheduled Zambdas are, when you should use them and how to create one. If you have not already read the Writing Zambdas guide, we recommend you do so before continuing.
Overview of Scheduled Zambdas
Scheduled Zambdas run at a regular interval. If desired, you can specify a start and end time frame for them to run.
Defining the rate at which a Scheduled Zambda runs is done using a cron expression. You can read more about cron expressions here (opens in a new tab).
Example use cases:
- Creating new
Slots
(opens in a new tab) every week - Sending patients appointment reminder texts before their appointments
- Sending data to a data lake or analytics tool on an hourly or daily basis.
- Monitoring for complex clinical triggers as in the Messaging and Engagement Workflows Blood Pressure Example
Creating a Scheduled Zambda
If you do not already have a Zambda, you can create one by following the Writing Zambdas guide.
Navigate to https://console.oystehr.com/zambdas (opens in a new tab) and select your Zambda. Make these edits:
- Trigger method
cron
- Specify a cron expression of
rate(1 minute)
- Choose a start and end date
- Save your changes
This image shows the UI for updating a Zambda to be a Scheduled Zambda:
If you wait until the start time for your Scheduled Zambda, you will see that it has been run. You can view the logs for your Zambda by clicking the Logs
button on the Zambda page.