#[cron]Expand description
Marks a function as a scheduled cron task.
Cron jobs run on a schedule, exactly once per scheduled time across the cluster.
§Attributes
timezone = "UTC"- Timezone for the schedulecatch_up- Run missed executions after downtimetimeout = "1h"- Execution timeout
§Example
ⓘ
#[forge::cron("0 0 * * *")]
#[timezone = "UTC"]
#[catch_up]
pub async fn daily_cleanup(ctx: &CronContext) -> Result<()> {
// ...
}