Closed DoronLGN closed 1 year ago
Silly question but is it possible that your rclone binary is called rclone.exe
and restic is trying to use just rclone
?
Silly question but is it possible that your rclone binary is called
rclone.exe
and restic is trying to use justrclone
?
It's true that the binary is called rclone.exe, but I'm not sure why this problem would only show up when running it through Task Scheduler.
The scheduled task is running as a different user. Is it possible that user doesn’t have rclone in its path?
On Tue, Aug 23, 2022 at 4:34 PM DoronLGN @.***> wrote:
Silly question but is it possible that your rclone binary is called rclone.exe and restic is trying to use just rclone?
It's true that the binary is called rclone.exe, but I'm not sure why this problem would only show up when running it through Task Scheduler.
— Reply to this email directly, view it on GitHub https://github.com/kmwoley/restic-windows-backup/issues/67#issuecomment-1224992900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOWG6CMS6QSY33FWA6DA43V2VNZ5ANCNFSM57J32F7Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
That did turn out to be the case @kmwoley. However, even when I added rclone to the SYSTEM path variable, restic complained that the rclone conf file was missing. I'm considering switching the task to my user account in Task Scheduler, since that fixes the problem.
That may be the easiest fix. If I recall, I made the task run as the SYSTEM account because it was simpler to make the install script that way. If I had used the user account, the install script would need to prompt for the user’s password.
There’s no reason not to change the task to your user account.
On Wed, Aug 24, 2022 at 1:52 PM DoronLGN @.***> wrote:
That did turn out to be the case @kmwoley https://github.com/kmwoley. However, even when I added rclone to the SYSTEM path variable, restic complained that the rclone conf file was missing. I'm considering switching the task to my user account in Task Scheduler, since that fixes the problem.
20220824T1521098144.err.txt https://github.com/kmwoley/restic-windows-backup/files/9419250/20220824T1521098144.err.txt .
— Reply to this email directly, view it on GitHub https://github.com/kmwoley/restic-windows-backup/issues/67#issuecomment-1226317979, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOWG6GC3WZWSBON7VX5O3DV22DQ3ANCNFSM57J32F7Q . You are receiving this because you were mentioned.Message ID: @.***>
I can run backup.ps1 perfectly fine through command prompt or powershell, but when I try to run it through Task Scheduler I get the following error log:
rclone is most definitely in a directory in my %PATH%, so I'm not sure what the cause of this problem might be. Some cursory Googling suggests this may be an issue with the syntax of exec, but that doesn't explain why it works fine when I run it manually.