troubleshooting Question

Create Scheduled Task "Run only when user is logged in" Not Working

Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)Flag for United States of America asked on
Windows BatchWindows OS
22 Comments1 Solution21 ViewsLast Modified:
Creating a scheduled task using bat script command:

SCHTASKS /Create /RU "user" /RP "password" /TN "name" /XML "file.xml" /F

Nothing in the XML seems to set the option to "Run only when user is logged in". Adding the /it option on the SCHTASKS command doesn't make any difference other than generating this warning:

WARNING: The task is registered, but not all specified triggers will start the task, check task scheduler event log for detailed information.

How can I create a scheduled task and set the "Run only when user is logged in" option using scripts?

Kevin
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros