Windows Scheduler

G

Guest

Hi ,

I facing an unknow issue in Windows Scheduler. For example , I create a
scheduler and name it as "Copy Files" on 01-Jan-2005 and I set it to run on
daily basis.
This task will copy some xml files from another server shared folder. The
scheduler able to run on 01-Jan-2005 . But on 02-Jan-2005 , the "Copy Files"
task failed to process.
I try to set the password and schedule it on another time for the same day
(02-Jan-2005) and it works.
I monitor it on 03-Jan-2005 again , the "Copy Files" does not run. Is it
the security issue or something else ? I log in as domain user and this user
has a full control rights. Any solution on this ?

Thank you.
 
P

Pegasus \(MVP\)

Travis said:
Hi ,

I facing an unknow issue in Windows Scheduler. For example , I create a
scheduler and name it as "Copy Files" on 01-Jan-2005 and I set it to run on
daily basis.
This task will copy some xml files from another server shared folder. The
scheduler able to run on 01-Jan-2005 . But on 02-Jan-2005 , the "Copy Files"
task failed to process.
I try to set the password and schedule it on another time for the same day
(02-Jan-2005) and it works.
I monitor it on 03-Jan-2005 again , the "Copy Files" does not run. Is it
the security issue or something else ? I log in as domain user and this user
has a full control rights. Any solution on this ?

Thank you.

There could be several reasons why the tasks fail. Most of them
are immediately obvious when you add some logging, e.g. like so:

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
xcopy.exe /.. /.. /.. SourceFolder TargetFolder\ 1>>c:\test.log
2>c:\test.err
echo ErrorLevel of xcopy.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now run this batch file under the Task Scheduler, then have a look
at the two log files!
 
G

Guest

Also, the Task Schedular has it's logging.

Start Windows Explorer
Got to My Computer \ Contrl Panel \ Scheduled Tasks
In the menu, select Advanced \ View Log

If the task even doesn't get started, here you can find out why not.
 
G

Guest

Hi ,

Thanks for the information , I able to get the some error desc now as show
as below.It looks strange for me since I able to run for the first time and
second time
had logon error .. Please help

"Task Scheduler Service"
4.71.2195.6920"XXCOPY travis.job" (XXCOPY.EXE) 5/18/2005 3:00:00 AM ** ERROR
**
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested logon
type at this computer.
Verify that the task's Run-as name and password are valid and try again.
"XXCOPY.job" (XXCOPY.EXE) 5/18/2005 3:00:00 AM ** ERROR **
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested logon
type at this computer.
Verify that the task's Run-as name and password are valid and try again.
"
 
P

Pegasus \(MVP\)

Run gpedit.msc, then give the account used for the
scheduled job the right to run as a batch job.
 
P

Pegasus \(MVP\)

You need to do a small amount of scratching to get there . . .
Local Computer Policy / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Log on as a batch job.
 

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