Task Scheduler Problem (run whether user is logged on or not)
I'm having a problem with scheduling a task in Windows 7 Home Premium. I have been having problems getting tasks to launch appropriately, so I set up a basic task as a test. I set it to open Calculator at a specific time. I then added options one at a time until I got the same failure to launch that I was getting on my previous tasks. The Calculator test task works as long as it is set for "Run only when user is logged on." As soon as I change the option to "Run whether user is logged on or not", the task fails to launch the application. The task starts (the status says "Running") but Calculator does not start up. I did not change any other option. This happens whether "Do not store password" is checked or not. Why would the "Run whether the user is logged on or not" option cause the task to fail? Is there a way to fix this? Thanks, LDL
February 5th, 2010 7:41pm

I just tried running a batch file, and it didn't run either. Again, it worked fine when I selected "Run only when user is logged in." I should have pointed out that every time I've tried to run my test task, I've still been logged in. It runs when I'm logged in and the "run only when user is logged in" radio button is selected, but it doesn't run when I'm logged in and the "run whether the user is logged in or not" radio button is selected. Edited to add: My end goal is to load a few websites, start up my RSS reader, and download a podcast or two about a half hour before I wake up. I lock my computer at night (and require a password to log on), and I'd like to run these tasks and have them ready to go when I start it back up in the morning. Is this even possible?
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2010 9:37pm

That's what you'd expect of an interactive task given the way the documentation is worded. It says it will not run interactively based on the radio button being selected, even if you're logged in.I just tested this (on Windows 7 Ultimate). I created a simple batch file with the following in it:ECHO I ran! I really did! >c:\temp\TestBat.logI scheduled it to run one time, using my account, and selected Run whether user is logged on or not. Then I logged off a couple of minutes before the scheduled time.Sure enough, when I watched the folder with another computer through the network, the TestBat.log file was created with the expected contents at the expected time.I don't know what to tell you besides "keep trying".What status did the scheduler list for the task after it should have run?-Noel
February 5th, 2010 9:58pm

Hi Did you manage to resolve this issue? Many thanks
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2010 8:35am

Still looking for answers for this particular issue. I have actually created a scheduled task on a Windows Server 2008 R2 box that kicks off a Powershell script. The script uses the robocopy command to mirror a directory on the server itself with a mapped drive to another machine on the same domain. When I manually start the scheduled task using the "Run only when user is logged on" option I can see the task run interactively and it mirrors the directories as expected. When I change the ST to use the "Run whether user is logged on or not" the script does not get executed. I understand that it will not be interactive if I run it in this manner but I do not understand why it does not run the script that contains the robocopy command. The ST reports that it completed successfully. I am using my domain account to launch the ST; I am an admin on the local server, a domain admin on the domain and I have full read/write/execute to the mapped drive I am copying to. Any ideas of what to check/update to get this set-up to work correctly? Thanks!!
July 2nd, 2010 1:29pm

To run the task with the option "Run whether user is logged on or not" you have to activate the option "Run with highest privileges". After activating this option the task really run whether the user is logged or not. Maybe it is helpful to configure the Actions as following: Program/script: C:\Windows\System32\cmd.exe Add argumetns (optional) : "/C C:\HelloWorld.bat" BR
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2010 7:33am

I've got the same problem with powershell backup command. Option option "Run whether user is logged on or not" makes the script doesn't work. But it's job status is OK. I tried many different options and methods to run this script. Once I wrote whole script in one long command and scheduled it. Every time there is the same result. I mean no results when option "Run whether user is logged on or not" is on. Of course "Run with highest privileges" is on. Does anyone know of a solution? Please help! BR
December 29th, 2010 7:32am

That's what you'd expect of an interactive task given the way the documentation is worded. It says it will not run interactively based on the radio button being selected, even if you're logged in. I just tested this (on Windows 7 Ultimate). I created a simple batch file with the following in it: ECHO I ran! I really did! >c:\temp\TestBat.log I scheduled it to run one time, using my account, and selected Run whether user is logged on or not . Then I logged off a couple of minutes before the scheduled time. Sure enough, when I watched the folder with another computer through the network, the TestBat.log file was created with the expected contents at the expected time. I don't know what to tell you besides "keep trying". What status did the scheduler list for the task after it should have run? -Noel I copied your example, and it worked for me as well, but with another task that also calls a batch, which in turn executes an SSIS package, it does not work when it's on "run when user is logged on or not".
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 5:35pm

Did you get a resolution to this matter? I have been trying to run an xcopy command in a bat file to copy files from my local Win 7 hard drive to a shared folder on another Win Vista Business machine. The bat file works fine, and it runs fine from task schedule until I select 'Run whether user is logged on or not' option, then it never runs, although the task history seems to think it has. So I changed my xcopy command so the destination was to the share path instead of mapped drive, this still didn’t work. My final attempt was to include the user name & password for the destination machine (share) in the path but this also failed. Any thoughts?
April 1st, 2011 5:53am

thanks that did the job!
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2011 7:39am

I had the same problem and a person with the user name "Try*3" has just answerd me and the solution is much simpler than Noel's. http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/basic-task-scheduler/7c29bd02-8160-e011-8dfc-68b599b31bf5 His solution is : "I think you have to use the Run only when user is logged on setting as that's all I could ever get to work - just because you have the thing locked does not alter the fact that it's you that is logged on." And this solution works even to run the calculator, any program with the account locked. :)
April 7th, 2011 1:22pm

LDL707, You have a very good question, It seems like you are having the same problem that I am having. When you Schedule a Task and Set it to Run whether user is logged on or not is checked, is an implied hidden task. http://technet.microsoft.com/en-us/library/cc722152.aspx You can specify that a task should run even if the account under which the task is scheduled to run is not logged on when the task is triggered. To do this, select the radio button labeled Run whether user is logged on or not. If this radio button is selected, tasks will not run interactively. To make a task run interactively, select the Run only when user is logged on radio button. Its a shame that the Microsoft Support person could not explicitly say that and suggest a possible solution. I first experienced this issue about 4 years ago when I was attempting to use test automation software to test applications. Today, I am still running into the same issue because I need to automate functions of a legacy user interface using .Net UI Automation, scheduled to execute in the middle of the night. I understand the need to have the desktop secure and a scheduled task running on an unlock desktop would be a risk. But after years of people talking about this issue I do not understand why the checkbox could not be relabeled and the task Run whether user is logged on or not, and the desktop locked. This would fix many problems and make UI Automation and countless other tasks run as the user expects, while running securely. It seems like a good percentage of people who use the new UI Automation framework (cool stuff) will be road blocked by this eventually and render countless applications useless. I have only found one way around this issue. You must use the radio button, Run only when user is logged on, stay logged in all the time, and lock your computer. Heaven help you if you need to run automation against legacy softer on a hosted server. Microsoft, we really do need this fixed
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2012 9:55pm

Hello Everyone, Succeeded !!!!!!! Even i was struggling with this same Problem to execute a batch via Window scheduler and set the setting to "Run whether the user is logged in or not". I tried many time but the batch runs with " Run whether user is logged on" and not with "Run whether user is logged on or not". what i discovered is that there was one mapped drive path in my batch file which was not the complete path like y:/AR.qvw actually what i did i changed that map path to the complete path like \\servnamename\d$\AR.qvw and the batch executed successfully with the setting "Run whether user is logged on or not" The conclusion is that check the dependency of the script on external resources because when you check this option "Run whether user is logged on or not" It actually conflicts. This my discovery. If you have any question write me on arungupta786@gmail.com Thanks & Regards, Arun
July 18th, 2012 8:19am

Yes Arun, your solution may work if "Run Weather user is logged on or not" radio button is set and you have a batch file, that needs to interact with a file in a given path. However that will still not help in cases where an application like Calculator (requiring user like interaction) needs to be displayed and a user is not logged in. The scheduled task will fail. FYI, \\servnamename\d$\AR.qvw is called UNC (universal naming convention) format: \\server\share\file_path
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 5:23pm

Dear All, Same problem yaar i am totally STUCK. http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/1aafa6cd-d972-4e5e-8e5b-1acb0239a942 Thanks Adeel ImtiazAdeel Imtiaz
July 20th, 2012 8:06am

Hello guys, got similar problem with Excel. I start a .cmd file which starts bypass all ps1 file which opens up Excel and does Refresh All. To get this through i did the following: * Create "Desktop" directory in Elevated CMD (This is important!) in C:\Windows\System32\config\systemprofile\DesktopC:\Windows\SysWOW64\config\systemprofile\Desktop * setup run whether user is logged on or not * setup run with highest priviliegies * click "Change user or group...", Advanced, Locations: select Whole Active directory, type in starts with the name of your account, then find now and pick the account from search results. This worked for me. Twitter: @EdaKucera
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2012 8:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics