Windows Scheduled Tasks of PowerGen not Functioning Properly

R

rock

I am attempting to schedule a bat file to kick off PowerGen at a
specified time. I have tested the bat file and I know it works
correctly. I have also tested the task with the "Run" command from the
right click and it executes successfully. I can run the scheduled
tasks while I am logged on to the computer. The scheduled tasks will
not run when I am logged off of the computer. I do not have have "Run
only if logged on" check box checked. I do have it enabled. I have
entered userid/password information that is required for it to use the
network. I have gone through C:\Windows\Tasks and from the menu
Advanced->AT Service Account and entered userid and password
information there as well. I have tried changing the account
information on the Task Scheduler service from the service account to a
specified userid and password ( same as above) but then when I attempt
to restart the service to have the settings take effect, I get an error
1079 - account information does not match other services in this
project. I'm really at my wit's end and have spent too much time on
this. Please Help!
 
P

Pegasus \(MVP\)

rock said:
I am attempting to schedule a bat file to kick off PowerGen at a
specified time. I have tested the bat file and I know it works
correctly. I have also tested the task with the "Run" command from the
right click and it executes successfully. I can run the scheduled
tasks while I am logged on to the computer. The scheduled tasks will
not run when I am logged off of the computer. I do not have have "Run
only if logged on" check box checked. I do have it enabled. I have
entered userid/password information that is required for it to use the
network. I have gone through C:\Windows\Tasks and from the menu
Advanced->AT Service Account and entered userid and password
information there as well. I have tried changing the account
information on the Task Scheduler service from the service account to a
specified userid and password ( same as above) but then when I attempt
to restart the service to have the settings take effect, I get an error
1079 - account information does not match other services in this
project. I'm really at my wit's end and have spent too much time on
this. Please Help!

Leave the account for the Task Scheduler service at the s"ystem"
account but use an account for your scheduled task that has
adequate rights for the resources you're trying to access.

Now create a batch file as below, placing your PowerGen command
inside:

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

Schedule this batch file to run while you're logged off, then
examine the two log files. Things should become a lot clearer!
 
R

rock

Thank you very much for the help! The log files showed that the
network directories couldn't be found as they were mapped network
drives (e.g. M:\mapped_drive\file), so I just called them directly
(\\network_drive\file) and it works like a charm. A very simple fix
for what resulted in being a simple problem. Thanks again!
 

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