pub struct ScheduledTask { /* private fields */ }Expand description
A Task Scheduler task that starts the program at the user’s logon, in the user’s own session
with the user’s own rights (LeastPrivilege): no administrator rights are asked or granted.
The task definition is written as XML under xml_dir and registered with schtasks.
Implementations§
Source§impl ScheduledTask
impl ScheduledTask
Sourcepub fn new(xml_dir: impl Into<PathBuf>) -> Self
pub fn new(xml_dir: impl Into<PathBuf>) -> Self
The real manager; the XML is staged under xml_dir (an existing owner-only directory).
pub fn with_parts(runner: Box<dyn CommandRunner>, xml_dir: PathBuf) -> Self
Sourcepub fn task_xml(spec: &ServiceSpec) -> Result<String>
pub fn task_xml(spec: &ServiceSpec) -> Result<String>
The task XML for spec. A spec with environment variables is refused: a scheduled task
has none.
Trait Implementations§
Source§impl ServiceManager for ScheduledTask
impl ServiceManager for ScheduledTask
Auto Trait Implementations§
impl !RefUnwindSafe for ScheduledTask
impl !UnwindSafe for ScheduledTask
impl Freeze for ScheduledTask
impl Send for ScheduledTask
impl Sync for ScheduledTask
impl Unpin for ScheduledTask
impl UnsafeUnpin for ScheduledTask
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