Solved

Windows 2008 R2 - Schedule task not Running when logged off

Posted on 2013-05-24
9
5,859 Views
Last Modified: 2013-07-02
Hi, We have the following environment

Windows 2008 R2 Server fully patched Terminal Server
Logging in as Domain admins

Issue:
Unable to run vb application via task schedule when set to run when either logged off or locked

Tests:
Ran schedule task to open notepad and notepad opens when you set the task to run only when logged on.

When we run the same task to open notepad but set to run when either logged off or locked  it doesn't open notepad but you can see the notepad.exe running in task manager.

So, I believe if wen can get notpad to open when the schedule task properties are set to run when logged off this will fix the issue with or vb program.

My hunch is it has something to do with Group policy or Security settings.  Even then the task is running as domain administrator and we are logged in as the domain administrator.

I have also tested on a windows 8 machine that is not part of the domain and the same issues occur

Cheers,
Troy
0
Comment
Question by:troyComp14
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39193766
From what you're saying it sounds like notepad.exe does run but you don't see the notepad window popping up, is that right as this is what I would expect if you are not logged in or the screen is locked, notepad is a program that requires user interaction so it requires an active desktop to display on.

Bringing up notepad is not a normal use for task scheduling, you would normally use it to perform maintenance tasks in the background that require no user interaction so this behaviour is normal.

What parameters in the run and startup fields are you using to launch the vb app?  I presume the VB app doesn't present any screens requiring user interaction when it is running as that would make it unsuitable for scheduling.

Does the vb app run fine from a command line on the same server?

Have you ticked the 'run whether user is logged on or not' tick box on the scheduled task?
0
 

Author Comment

by:troyComp14
ID: 39193838
All the testing is done when I am logged on viewing the screen and running the scheduled task manually.

We have this program on a number of servers and I am only aware of the issue on 2008 server.

The VB program has a /noui agrument which means no user interface is presented.  When we are testing we remove this argument to ensure the program actually opens up requiring user interaction so we can see if the task schedule is working probably.  On this particular server it doesn't happen, so we came up with the test from other forums to try and open up notepad from a schedule task to ensure it isn't the VB program.

To recap:
1) I am logged on the server as the domain administrator
2) I ran the task MANUALLY with the 'run whether user is logged on or not' tick box CHECKED.  Notepad doesn't launch
3) I run the task again with the "run whether user is logged on or no" tick box UNCHECKED
and Notpad Launches.

So I believe point 2) should work as I am logged on therefore notepad should lauch
0
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39193865
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 2

Expert Comment

by:Mike-Schultz
ID: 39193975
In the scheduled task
under the Actions tab
select edit
In the field "Start in (Optional) - enter the location (folder) where the script sits that you are running

I has simuliar issue pulling info from an AD group and creating a txt file with that info.
Worked when launched manually but not from the scheduled task until I did the above.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39194600
Hi.

As said before: normal behavior. You are storing a password, so imagine the following scenario: someone else is logged on and the task starts notepad interactively (=visible)... this would enable that someone to act as another user... good-bye, security!
That's why notepad does not show up - it runs non-interactive for securiry reasons.
0
 

Author Comment

by:troyComp14
ID: 39249388
We still haven't been able to resolve the issue.

We have this application installed on hundreds of servers and it only seems to be an issue on 2008R2
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39249698
Name one OS that displays it, please.
0
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39249844
I think we are getting away from the real issue which is the VB app is not working when the OP tries to run it as a scheduled task.  Lets forget about notepad not running and concentrate on the VB app.

Does wscript or cscript run at all when the scheduled task for the VB app runs?

Does it generate a failure error in the scheduled tasks manager, if so what is the code it is generating?
0
 
LVL 2

Accepted Solution

by:
Mike-Schultz earned 500 total points
ID: 39252858
Was this tired?

In the scheduled task
under the Actions tab
select edit
In the field "Start in (Optional) - enter the location (folder) where the script sits that you are running

I has simuliar issue pulling info from an AD group and creating a txt file with that info.
Worked when launched manually but not from the scheduled task until I did the above.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now