Schema for scheduled jobs.
Represents a job scheduled to run at a specific time. Jobs are polymorphic and can reference any type of resource (posts, emails, notifications, etc.).
Fields
job_type- Type identifier (e.g., "publish_post", "send_email")handler_module- Module that implementsPhoenixKit.ScheduledJobs.Handlerresource_type- Type of resource (e.g., "post", "email")resource_uuid- UUID of the target resourcescheduled_at- When the job should executeexecuted_at- When the job actually executed (nil if pending)status- Current status: "pending", "executed", "failed", "cancelled"attempts- Number of execution attemptsmax_attempts- Maximum retry attempts (default: 3)last_error- Error message from last failed attemptargs- Additional arguments passed to the handlerpriority- Execution priority (higher = more urgent)created_by_uuid- Optional user who created the job
Summary
Functions
Changeset for cancelling a job.
Changeset for creating a new scheduled job.
Changeset for marking a job as executed.
Changeset for marking a job as failed.
Changeset for rescheduling a job.
Functions
Changeset for cancelling a job.
Changeset for creating a new scheduled job.
Changeset for marking a job as executed.
Changeset for marking a job as failed.
Changeset for rescheduling a job.