Struct woddle::JobConfig[][src]

pub struct JobConfig {
    pub name: String,
    // some fields omitted
}
Expand description

Configuration for a job

Fields

name: String

An arbitrary identifier used for logging

Implementations

Configuration for a single woddle job

Initialized with the name and sync_key of the job.

The name is an arbitrary identifier for the job. The sync_key is a unique identifier, which is used within the database.

For a job to be valid, either the interval, or the cron configuration need to be set.

If neither are set, the job_runner will exit with an Error.

Create a new job with an arbitrary name and a unique sync key

After creating a job, you need to set either interval, or cron for the job to be valid

Sets the interval a job should be run at

Creates a cron schedule from the given Quartz cron expression

Example: "* 0 0 ? * * *"

Panics

Panics if the expression is not valid

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.