Scheduled Task not completing

G

Guest

I have some scheduled tasks running and while I am logged onto the computer,
either first hand or remotely, they run fine, complete, and close. When I am
not logged on they remain opened at the end of their job, do not close, and
therefore do not complete the task. These are reports that are automatically
updated from a database every 2 hours. When I am not logged in they do not
save, but as soon as I log in I see multiple windows and they close
automatically and save the new report.

Any ideas on this?

I have them set to run while not logged on and have reset them multiple
times. I noticed the problem once we updated to SP2.

Any thoughts or advise would be greatly appreciated.

Dave
 
P

Pegasus \(MVP\)

DHICKS said:
I have some scheduled tasks running and while I am logged onto the computer,
either first hand or remotely, they run fine, complete, and close. When I am
not logged on they remain opened at the end of their job, do not close, and
therefore do not complete the task. These are reports that are automatically
updated from a database every 2 hours. When I am not logged in they do not
save, but as soon as I log in I see multiple windows and they close
automatically and save the new report.

Any ideas on this?

I have them set to run while not logged on and have reset them multiple
times. I noticed the problem once we updated to SP2.

Any thoughts or advise would be greatly appreciated.

Dave

This is in most cases a question of you not knowing what's
going on. Embed your task in the following batch file, schedule
it, then examine the two log files.

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
c:\Tools\YourTask.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
 
T

tlviewer

DHICKS said:
I have some scheduled tasks running and while I am logged onto the
computer, either first hand or remotely, they run fine, complete, and
close. When I am not logged on they remain opened at the end of their
job, do not close, and therefore do not complete the task. These are
reports that are automatically updated from a database every 2 hours.
When I am not logged in they do not save, but as soon as I log in I
see multiple windows and they close automatically and save the new
report.
Any ideas on this?
I have them set to run while not logged on and have reset them multiple
times. I noticed the problem once we updated to SP2.

DHicks,

By reports do you mean something like a visible Access window?
It would help if you described if the "task" is a VBScript or VB App. or
whatever. Whatever it is, if it interacts with the Desktop or needs a
visible GUI at any time, then "setting to run while not logged on" will not
change the behavior -- the task still must wait for those resources needed
for the GUI.

good luck,
tlviewer
 
G

Guest

You could spend a lot of time and effort looking for a solution or just do
what a lot of other users do to make sure scheduled tasks run and that is to
stay logged on.As in switch users if you are operating a multi-user
system,but make sure that you as the system administrator is logged on.Not
the ideal solution I know but it works and as mentioned previously it is more
efficient then looking for a cause and cure.
 
P

Pegasus \(MVP\)

Scheduled tasks work very reliably when configured properly.
Your method will cure the symptoms but not the underlying
cause. To me it's a last resort, not the first.
 
G

Guest

How do I embed the scheduled task into the batch file?

I replaced "c:\Tools\YourTask.exe" with the location of my scheduled task
"c:\windows\tasks\NAME" Am I on the right track?

Thanks

Dave
 
G

Guest

How do I embed the scheduled task into the batch file?

I replaced "c:\Tools\YourTask.exe" with the location of my scheduled task
"c:\windows\tasks\NAME" Am I on the right track?

Thanks

Dave
 
P

Pegasus \(MVP\)

Yes.


DHICKS said:
How do I embed the scheduled task into the batch file?

I replaced "c:\Tools\YourTask.exe" with the location of my scheduled task
"c:\windows\tasks\NAME" Am I on the right track?

Thanks

Dave
 

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