Re: Scheduled Tasks result - 0x1

J

Jose

Hi Guys,

First of all, im a newbie so apologies in advance if this query sounds
stupid.

I have created a BAT file which is supposed to automatically connect to
a reporting software and output some data into an excel file. Rather
than to always manually run this BAT file, I am then using windows XP
scheduler to run this BAT file daily at a given time.
When i run the BAT file manually then it works fine - it connects to
the software and outputs the data as i expect it to. However, when i try
and run this bat file through windows schduler then unfortunately it
doesnt work.

I get an *0x1* error under the *last result* column in the *scheduled
tasks *window.
I checked the microsoft website to see what this means and i got the
following description for this error: "0x1: An incorrect function was
called or an unknown function was called".

Unfortunately, i'm still not sure why i am getting this message or what
i can do to rectify this problem.

Any help would be greatly appreciated!! Many thanks for your time and
help :)

Regards,

Zaf

--
z4f786
------------------------------------------------------------------------
z4f786's Profile:http://forums.techarena.in/members/99916.htm
View this thread:http://forums.techarena.in/windows-xp-support/1183461.htm

http://forums.techarena.in

I worked on Scheduled Tasks with another guy, here is the part of my
lengthy
dialogue for him:

User name and password are required. You have to add a password to
the account that is going to run the task - even if you use
Administrator (which usually has no password). If you use the
Administrator account and change the password, you better remember
what it is, or use another account.

To get a good look at things, go to Control Panel, Administrative
Tools, Services. Stop the Task Scheduler.

Navigate to c:\windows. There is a log file called SchedLgU.Txt.
Look near the bottom around the current time for stuff like:

The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x8007052e: Logon failure: unknown user name or bad password.

Chances are the account name for the task has no password. It needs
one.

With the service stopped, you can delete the SchedLgU.Txt file to
start over. Restart the Task Scheduler Service and be sure it is set
to Automatic and Running. Look at the SchedLgu.Txt file now and there
is an appropriate message.

Navigate to c:\windows\tasks. There are all your tasks that you would
see in Control Panel. You can right click them and set up the
properties to have a valid user account and password, or you can do it
through Control Panel. When you Apply any changes, there should be no
errors. If you have an error, the task will get created but will not
run.

You can then right click the task and choose Run and it will run it
right now. Look in the SchedLgU.Txt file to see what happened. If
there is an error, we need to know what the error it is and figure it
out. If you see something like:

The specific error is:
0x80070005: Access is denied.

You have a permissions problem in the usr and/or password. So be
really, really sure the account and password are correct.

For practice, create a new task to run the Command Prompt sometime in
the future
Use your known good account and password. Assuming there
are no errors in the creation, you should be able to right click the
task and Run it and a Command Prompt window should open immediately.
If that works, you now know how to set up a scheduled task
successfully You can delete that task when finished testing.

Troubleshoot errors from what you see in the SchedLgU.Txt file, or
look in there to see what things look like when it runs successfully.
If the log gets too cumbersome, delete it as above.

Please report back your results.

Jose
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top