Skip to main content

cron

Attribute Macro cron 

Source
#[cron]
Expand description

Marks an async fn as a pgqueue cron job, run on the given schedule.

The first argument is the cron expression; its syntax and whether it can ever produce a UTC occurrence are checked at compile time. The rest are the same configuration attributes as job. Cron functions take no payload — every parameter is an extractor.

The accepted attributes are documented on the re-export this is used through, pgqueue::cron.