Task Scheduler 0x2 error

Dear Experts

I have a batch file to FTP a file to a remote server - this is run in Task Manager, however it always returns a 0x2 error.

If I manually run the batch file it works perfectly.

Can anyone offer any suggestions?

Thanks
grantballantyneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
Check the permissions / user context under which the file is running in Task Manager.  Assuming it isn't under the same permissions you are connected to the desktop, try opening up a cmd session as the other user (Control-Shift-rightclick -- 'run as different user') and see if the batch file works as expected as the other user.  Could be permissions or a directory that doesn't exist in the other user context.
0
oBdACommented:
2 is usually "file not found".
Did you provide the full path to your batch file in Task Scheduler?
Did you set the "Start in" path in Task Scheduler to the folder with the script?
Are the scripts and/or parts of it (config files, ftp scripts, ...) coming from a network drive, and if so ...
... did you use the UNC instead of a drive letter?
... does the account running the script have permissions to access the network resource?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.