Open jordan-dalby opened 8 months ago
Heyy @jordandalby no problem, use this skpt to create a startup job, so you use the same skirpt as for updating
# Set the path to the file to be executed
$psScriptPath = "$env:APPDATA\ARK-Ascended-Server-Manager\AutoUpdateJob.ps1"
# Set the task name
$taskName = "MeinCustomTask"
# Create the trigger for "at startup"
$trigger = New-ScheduledTaskTrigger -AtStartup
# Create the action to run PowerShell with the script path as an argument
$action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument "-ExecutionPolicy Bypass -File `"$psScriptPath`""
# Register the task in the Task Scheduler
Register-ScheduledTask -TaskName $taskName -Trigger $trigger -Action $action -RunLevel Highest -User "SYSTEM"
where would i add this at, mines reboots also
An auto-start toggle would be nice. My server reboots every night, so having an option to auto-start on reboot would be very nice. Also, is there a way that I can force a save just before the restart? (I'm running ubuntu server with a win10 vm).