Hi Guys,
I am experiencing an issue when trying to run FFS via batch job from Windows Task Scheduler.
When I run the batch job manually by double clicking it, it runs absolutely fine.
However when I execute from Task Scheduler I get the error at the top of the attached file.
I am running this on Windows 10. Strangely I am running a similar task with the same parameters on my Windows 7 laptop and it works fine. Both jobs are copying data to my NAS.
Currently running version 8.8 of FFS on both machines.
Any ideas?
Error Code 3: The system cannot find the path specified. (GetFileAttributes)
- Posts: 3
- Joined: 19 Jan 2017
- Attachments
-
- Error when batch file is executed via Task Scheduler.docx
- (138.42 KiB) Downloaded 192 times
- Posts: 2451
- Joined: 22 Aug 2012
You are trying to sync a folder on drive Y:.
Probably, this is a mapped drive (a remote resource mapped to the drive letter Y:), and not a local drive.
Drive letters for local drives are "fixed", but drive mappings are user dependent.
That is: user A might have a drive Y, but user B might not.
Even more, even if both have a drive Y, it does not necessarily point to the same location.
Make sure that the job you run from the task scheduler is run under a/the user account that has Y mapped to the correct network location (and has write access in that location).
Or: define the network address instead of the mapped drive name in your sync job, e.g. //192.168.1.23/syncloc/ instead of using a Y-drive mapped to //192.168.1.23/syncloc/ (for a specific user).
Probably, this is a mapped drive (a remote resource mapped to the drive letter Y:), and not a local drive.
Drive letters for local drives are "fixed", but drive mappings are user dependent.
That is: user A might have a drive Y, but user B might not.
Even more, even if both have a drive Y, it does not necessarily point to the same location.
Make sure that the job you run from the task scheduler is run under a/the user account that has Y mapped to the correct network location (and has write access in that location).
Or: define the network address instead of the mapped drive name in your sync job, e.g. //192.168.1.23/syncloc/ instead of using a Y-drive mapped to //192.168.1.23/syncloc/ (for a specific user).
- Posts: 3
- Joined: 19 Jan 2017
I can confirm that drive Y: is always the location for this 'fixed' mapped drive. Also, why does it run without issue when I trigger is manually?
I appears to be something to do with the exchanged between the scheduled task and the batch file.
Any further help would be appreciated
I appears to be something to do with the exchanged between the scheduled task and the batch file.
Any further help would be appreciated
- Posts: 3
- Joined: 19 Jan 2017
p.s. it also works when executed from RealTimeSync
- Posts: 2451
- Joined: 22 Aug 2012
In line with my earlier reply:I can confirm that drive Y: is always the location for this 'fixed' mapped drive. hendothehun, 19 Jan 2017, 13:57
When you manually run the task, you run it with your then current user credentials.
For that user a mapped drive Y might "always" be mapped to the intended location.
However, when using the task scheduler, the default user is "system",
which user almost certainly does not have a Y-drive mapped to the intended location.
In the task scheduler you can change/specify the user credentials under which the task is to be run. If you there specify user credentials for a user that has a Y-drive mapped to the intended location (and has write access there) it will likely work.
But, it is probably better (more robust) to specify the network location in FFS by its network path, rather than by a mapped drive name, as the network path is user independent. See my earlier reply.