Scheduling a task
Beam apps can be scheduled to run using the
Here’s an example of what this might look like:
app.Trigger.Schedule( when="every 5m", handler="run.py:send_text", )
Schedule supports cron and string expressions. You can use Crontab to help generate expressions.
Cron Expression Cheatsheet
Beam supports standard cron expressions. Here are a few examples:
|Every day at mightnight|
|2:10 p.m. and at 2:44 p.m. every Wednesday in the month of March|
String Expression Cheatsheet
You can also write expressions using a friendlier human-readable syntax, for intervals up to 1 hour.
|Every 1 second|
|Every 5 minutes|
|Every 3 hours|