pub struct TaskBuilder { /* private fields */ }Expand description
Configures one application-owned callback.
Implementations§
Source§impl TaskBuilder
impl TaskBuilder
Sourcepub fn new<F, Fut, E>(
name: impl Into<String>,
expression: impl Into<String>,
callback: F,
) -> Self
pub fn new<F, Fut, E>( name: impl Into<String>, expression: impl Into<String>, callback: F, ) -> Self
Create a task with a stable name, five-field cron expression, and async callback.
Sourcepub fn timezone(self, timezone: impl Into<String>) -> Self
pub fn timezone(self, timezone: impl Into<String>) -> Self
Evaluate this task in an IANA timezone instead of UTC.
Sourcepub fn without_overlapping(self) -> Self
pub fn without_overlapping(self) -> Self
Skip overlapping executions, using Laravel’s default 24-hour lock lifetime.
Sourcepub fn overlap_lifetime(self, lifetime: Duration) -> Self
pub fn overlap_lifetime(self, lifetime: Duration) -> Self
Skip overlapping executions, using a positive whole-second lock lifetime.
Sourcepub fn on_one_server(self) -> Self
pub fn on_one_server(self) -> Self
Elect one scheduler for each occurrence using the configured shared cache.
Auto Trait Implementations§
impl !RefUnwindSafe for TaskBuilder
impl !UnwindSafe for TaskBuilder
impl Forget for TaskBuilder
impl Freeze for TaskBuilder
impl Move for TaskBuilder
impl Send for TaskBuilder
impl Sync for TaskBuilder
impl Unpin for TaskBuilder
impl UnsafeUnpin for TaskBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more