Solved

How to use SCHTASKS in DOS to run a task when user is not logged on

Posted on 2009-07-05
5
2,251 Views
Last Modified: 2013-12-04
I have successfully created a task in DOS to run in the Windows Server 2008 Task Scheduler, using the DOS SCHTASKS command and syntax.

The task runs successfully, but only if I as Administrator am logged in.

If I am not logged in, the task does not run.  Even if I go into Task Scheduler and tell the task to run at the scheduled time whether I am logged in or not, the task does not run.

My guess is that once the task is created in DOS, you cannot edit it in the Task Scheduler without breaking it.

Is there a syntax in DOS that will, upon creating the task, allow the task to run whether the user is logged in or not?
0
Comment
Question by:apitech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24781880
Hi, Im pretty sure that if your task is a .bat file, the scheduler should have no problem executing

But, make sure to place your user and password on the task scheduler object while making the task

I think, as you are finishing the scheduler wizard, near the end should be an option for "Run As" and place your loggin credentials, this option is also found in the Tasks Screen

Have you tried this?

Jfer
0
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24812806
any advancements?
0
 
LVL 1

Author Comment

by:apitech
ID: 24874532
Here's the scoop.  This cannot be done in Windows Server 2008, since 2008 will not interact with the desktop.
0
 
LVL 1

Accepted Solution

by:
apitech earned 0 total points
ID: 24874536
Here's the scoop.  This cannot be done in Windows Server 2008, since 2008 will not interact with the desktop.
0
 
LVL 9

Expert Comment

by:jfer0x01
ID: 24875496
Ok,

does your user have "Log on as batch jobs" rights?

Does the user have a security entry inside the .bat file in question, for both NTFS and share permissions if necessary?

Is the .bat file in a public folder or a folder readable to the user account?

Did you place Win2003 Compatibility on the Task?

Did you check "Run whether user is logged in or not in the task"?

I did all these things, and it works

What do you mean by interact with Desktop? In what sense?

Jfer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 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