Task scheduler problem at logoff

G

Guest

Although I have successfully added a net user called 'Schedule' to my company
network (with full Administrator rights) and am using an exclusive password
to run task schedules - they DON'T run when the computer is logged off - i.e.
when they're supposed to!

What could be going wrong and how do I fix it?
 
P

Pegasus \(MVP\)

Zakynthos said:
Although I have successfully added a net user called 'Schedule' to my company
network (with full Administrator rights) and am using an exclusive password
to run task schedules - they DON'T run when the computer is logged off - i.e.
when they're supposed to!

What could be going wrong and how do I fix it?

Have a look at the Task Scheduler log file to see what's
going on.
 
D

Dave Patrick

Scheduled Tasks|Advanced|View Log may provide some details. If the job
connects to another machine you may need to add the user/ group 'logon as
batch job' rights (server side). Control Panel|Admin Tools|Local Security
Policy\Local Policies\User Rights Assignments
"Log on as a batch job"

If the task completes but the job does not then there is a problem in the
job itself. Remember that if it involves network resources to make sure the
user account has permissions to the resources and also use UNC paths as
mapped drives won't natively exist when no one is logged on.


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
G

Guest

Dave,

I think the task completed but the job certainly didn't.

I think also, that I'm using UNC paths in the task:

In the 'RUN' window - I would have something like:"d:\documents and
settings\702950849\My Documents\autoitmacros\Programname.exe"

In the 'Start in' window I would have:

"d:\documents and settings\702950849\My Documents\autoitmacros

Is this what you mean by full UNC path?

In the 'Run as' window I would have:

ABC9999076\Schedule

After I log back on IO find that the task status is shown as 'running' but
the task hasn't run.

I'm not sure where I'm going wrong.





Dave Patrick said:
Scheduled Tasks|Advanced|View Log may provide some details. If the job
connects to another machine you may need to add the user/ group 'logon as
batch job' rights (server side). Control Panel|Admin Tools|Local Security
Policy\Local Policies\User Rights Assignments
"Log on as a batch job"

If the task completes but the job does not then there is a problem in the
job itself. Remember that if it involves network resources to make sure the
user account has permissions to the resources and also use UNC paths as
mapped drives won't natively exist when no one is logged on.


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Zakynthos said:
Although I have successfully added a net user called 'Schedule' to my
company
network (with full Administrator rights) and am using an exclusive
password
to run task schedules - they DON'T run when the computer is logged off -
i.e.
when they're supposed to!

What could be going wrong and how do I fix it?
 
G

Guest

Thanks for your advice - how do I check the log file? - I can't find it
anywhere

Scheduled Tasks/Schedule/Advanced tab doesn't give me a 'view log' option
only an 'Advanced Schedule Options' - unless I'm looking in the wrong place
 
P

Pegasus \(MVP\)

You're looking in the wrong place. Dave Patrick said

"Scheduled Tasks|Advanced|View Log" but you write
"Scheduled Tasks/Schedule/Advanced"

Spot the difference!
 
D

Dave Patrick

UNC is something like.

\\servername\sharename

Doesn't apply in your case for local drives. Are you using AutoitX script?
Might be when your task runs it requires a desktop to spawn some gui which
can't happen since no one is logged on.


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
G

Guest

Dave,

Thanks for that.

Yes I am using Autoit scripts, does that mean I won't be able to run them
with task scheduler when logged off, or can I configure it in some way to
work in this environment?
 
D

Dave Patrick

No idea really since I don't know what you're doing. But any gui interface
interaction won't be able to happen.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
G

Guest

Dave,

Although using Autoit, and agreed that with a gui, it cannot happen on
logoff - I think I have other ways round it by switching to VisualBasic
scripts - but my main problem seems to be in getting any task set up with
Windows task scheduler to run at logoff.

I've tried (to test passwords and access etc) scheduling a task to simply
open a program (such as Excel) with both my normal user/password logon to
Novell (and this runs fine when logged on) and at logoff (when it doesn't)

I've also tried using the 'user' Schedule to perform the same task - and in
this case (despite having successfully adding this user/password to net users
localgroups administrators) it neither works on logon or logoff - task
schedules are shown as 'running' but nothing happens - if I could solve this
problem with the 'Schedule' user at both logon and of course logoff in
particular, then I could re-write my Autoit scripts as Visualbasic.

The tasks I am trying to automate relate to a real-time database containing
data which is continually updated - and I am producing hourly reports between
09:00 and 22:00 Mon-Sun initially in html format then in .xls format then
saving them to folders Mon-Sun. It will save a department some 35 hours of
manual work per week if this is implemented so I think it is worth trying to
find a solution if I possibly can.
Dave Patrick said:
No idea really since I don't know what you're doing. But any gui interface
interaction won't be able to happen.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Zakynthos said:
Dave,

Thanks for that.

Yes I am using Autoit scripts, does that mean I won't be able to run them
with task scheduler when logged off, or can I configure it in some way to
work in this environment?
 
D

Dave Patrick

Use the Group policy editor
%systemroot%\system32\gpedit.msc

User Config\Windows Settings\Scripts\Logon/Logoff
Computer Config\Windows Settings\Scripts\Startup/Shutdown


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
G

Guest

Dave,

Many thanks - I'd like to give this a try but where do I find the Group
policy editor and when I have located what do I input? Is it:

%systemroot%\system32\gpedit.msc
User Config\Windows Settings\Scripts\Logon/Logoff
Computer Config\Windows Settings\Scripts\Startup/Shutdown

or just:

User Config\Windows Settings\Scripts\Logon/Logoff
Computer Config\Windows Settings\Scripts\Startup/Shutdown

and when the apropriate lines are added to the editor will this then:

(a) disable to logon/logoff on the PC?

(b) allow the task schedule 'user' Schedule to run at logoff?






Dave Patrick said:
Use the Group policy editor
%systemroot%\system32\gpedit.msc

User Config\Windows Settings\Scripts\Logon/Logoff
Computer Config\Windows Settings\Scripts\Startup/Shutdown


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

Zakynthos said:
Dave,

Although using Autoit, and agreed that with a gui, it cannot happen on
logoff - I think I have other ways round it by switching to VisualBasic
scripts - but my main problem seems to be in getting any task set up with
Windows task scheduler to run at logoff.

I've tried (to test passwords and access etc) scheduling a task to simply
open a program (such as Excel) with both my normal user/password logon to
Novell (and this runs fine when logged on) and at logoff (when it doesn't)

I've also tried using the 'user' Schedule to perform the same task - and
in
this case (despite having successfully adding this user/password to net
users
localgroups administrators) it neither works on logon or logoff - task
schedules are shown as 'running' but nothing happens - if I could solve
this
problem with the 'Schedule' user at both logon and of course logoff in
particular, then I could re-write my Autoit scripts as Visualbasic.

The tasks I am trying to automate relate to a real-time database
containing
data which is continually updated - and I am producing hourly reports
between
09:00 and 22:00 Mon-Sun initially in html format then in .xls format then
saving them to folders Mon-Sun. It will save a department some 35 hours
of
manual work per week if this is implemented so I think it is worth trying
to
find a solution if I possibly can.
 
D

Dave Patrick

Paste this line in the Run box and hit enter.

%systemroot%\system32\gpedit.msc

a) No
b) No, not exactly

You'll add your non-gui VB app to the appropriate location.



--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 

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

Similar Threads


Top