pub struct CalendarSchedule {
pub month: Option<u8>,
pub day: Option<u8>,
pub weekday: Option<u8>,
pub hour: Option<u8>,
pub minute: Option<u8>,
}Expand description
Represents a calendar-based schedule for running services. Fields are optional - None means “any” (like * in cron).
Fields§
§month: Option<u8>Month (1-12)
day: Option<u8>Day of month (1-31)
weekday: Option<u8>Day of week (0=Sunday, 1=Monday, …, 6=Saturday)
hour: Option<u8>Hour (0-23)
minute: Option<u8>Minute (0-59)
Implementations§
Source§impl CalendarSchedule
impl CalendarSchedule
Sourcepub fn to_systemd_oncalendar(&self) -> String
pub fn to_systemd_oncalendar(&self) -> String
Convert to systemd OnCalendar format. Examples: “--* 03:00:00” (daily at 3am), “Mon --* 00:00:00” (every Monday)
Sourcepub fn to_launchd_dict(&self) -> Vec<(String, i64)>
pub fn to_launchd_dict(&self) -> Vec<(String, i64)>
Convert to launchd StartCalendarInterval dictionary entries.
Trait Implementations§
Source§impl Clone for CalendarSchedule
impl Clone for CalendarSchedule
Source§fn clone(&self) -> CalendarSchedule
fn clone(&self) -> CalendarSchedule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CalendarSchedule
impl Debug for CalendarSchedule
Source§impl Default for CalendarSchedule
impl Default for CalendarSchedule
Source§fn default() -> CalendarSchedule
fn default() -> CalendarSchedule
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CalendarSchedule
impl RefUnwindSafe for CalendarSchedule
impl Send for CalendarSchedule
impl Sync for CalendarSchedule
impl Unpin for CalendarSchedule
impl UnwindSafe for CalendarSchedule
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