3
I want a Windows scheduled task to execute an FTP batch file which will upload some files to my server. If I run the argument below from the command line then it executes successfully.
ftp -i -s:C:\<path-to-file>\ftp.dat
When I try and run this through a scheduled task it always gets to created task process and stays like this; it does not complete or fail. I have also tried this without the put commands and it still does it so it's not as if it is waiting to transfer the files.
I am creating the task through the task scheduler GUI on Windows Vista. Under the general tab I have run whether the user is logged on or not and run with highest privileges set.
Under actions it is set to run C:\\Windows\System32\cmd.exe
.
And the argument is
ftp -i -s:C:\<path-to-file>\ftp.dat
The ftp.dat file looks like this:
open ftp.mysite.co.uk
myUsername
myPassword
put C:\<path-to-file>\file.xml
put C:\<path-to-file>\file2.xml
bye
I don't understand why this runs perfectly fine manually from the command line, but not from the scheduled task.
Check out this post for some helpful tips that will likely help you resolve if you've not already: https://superuser.com/questions/1005192/problems-scheduling-a-task-on-windows7/1005216#1005216 I'll be happy to further help if you wish, just tag me back if so.
– Pimp Juice IT – 2017-09-23T18:51:48.903