Aggiunge task scheduler XML
This commit is contained in:
45
tasks/BakRestBackupOnLogoff.xml
Normal file
45
tasks/BakRestBackupOnLogoff.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
||||
<RegistrationInfo>
|
||||
<Author>BakRest</Author>
|
||||
<Description>Run Bak&Rest no-GUI backup when the user logs off, then shut down on success.</Description>
|
||||
</RegistrationInfo>
|
||||
<Triggers>
|
||||
<EventTrigger>
|
||||
<Enabled>true</Enabled>
|
||||
<Subscription><QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[(EventID=4647)]]</Select></Query></QueryList></Subscription>
|
||||
</EventTrigger>
|
||||
</Triggers>
|
||||
<Principals>
|
||||
<Principal id="Author">
|
||||
<GroupId>S-1-5-32-545</GroupId>
|
||||
<RunLevel>LeastPrivilege</RunLevel>
|
||||
</Principal>
|
||||
</Principals>
|
||||
<Settings>
|
||||
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
|
||||
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
|
||||
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
|
||||
<AllowHardTerminate>false</AllowHardTerminate>
|
||||
<StartWhenAvailable>true</StartWhenAvailable>
|
||||
<RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
|
||||
<IdleSettings>
|
||||
<StopOnIdleEnd>false</StopOnIdleEnd>
|
||||
<RestartOnIdle>false</RestartOnIdle>
|
||||
</IdleSettings>
|
||||
<AllowStartOnDemand>true</AllowStartOnDemand>
|
||||
<Enabled>true</Enabled>
|
||||
<Hidden>false</Hidden>
|
||||
<RunOnlyIfIdle>false</RunOnlyIfIdle>
|
||||
<WakeToRun>false</WakeToRun>
|
||||
<ExecutionTimeLimit>PT4H</ExecutionTimeLimit>
|
||||
<Priority>7</Priority>
|
||||
</Settings>
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
<Command>C:\Python314\python.exe</Command>
|
||||
<Arguments>-m bakrest.tray_app --nogui</Arguments>
|
||||
<WorkingDirectory>C:\devel\bak&rest</WorkingDirectory>
|
||||
</Exec>
|
||||
</Actions>
|
||||
</Task>
|
||||
Reference in New Issue
Block a user