#[job]Expand description
Marks a function as a background job.
Jobs are durable background tasks that survive server restarts and automatically retry on failure.
§Attributes
timeout = "30m"- Job timeoutpriority = "normal"- background, low, normal, high, criticalmax_attempts = 3- Maximum retry attemptsworker_capability = "general"- Required worker capability
§Example
ⓘ
#[forge::job]
#[timeout = "30m"]
#[priority = "high"]
pub async fn send_welcome_email(ctx: &JobContext, input: SendEmailInput) -> Result<()> {
// ...
}