1

I have a Task created on Windows 2012 Server, that is set to run when I login, and it does just that, when I login it starts running, and if I want to I can run it manually:

https://i.sstatic.net/5s5Jk.jpg

I created another task, with the same exactly settings, but set to run whether I'm logged or not.

https://i.sstatic.net/zCuOP.jpg

This task does not tun automatically (although the log says it does), and I can't even run it manually, when I try to run it manually nothing happens.

What can I change to make it run?

2
  • The log says it runs, what makes you think it doesn't? You may need to improve your BAT script logging to see what's going on. Commented Jun 9, 2022 at 15:30
  • @mfinni when the script runs it opens a cmd window, and it runs some commands, so it's possible to visualize if it's working or not, that´s how I know TASK 2 does nothing Commented Jun 9, 2022 at 15:35

1 Answer 1

2

https://social.technet.microsoft.com/Forums/ie/en-US/c03d6691-b058-4f8d-961c-e8eba25bbaed/task-scheduler-problem-run-whether-user-is-logged-on-or-not?forum=w7itprogeneral

The answer says

There is some pertinent info for your issue in the Task Security Context topic in the Scheduler help file...

Specifically, it says, "...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

So if you're expecting to see a window, you will not. As I said, add some logging if you need to troubleshoot further.

13
  • the only difference between the two tasks is precisely that, one is set to run at my login and the other should run either way. If I change this they will be equal. Thing is when I set it to run whether I'm logged in or not it stops working Commented Jun 9, 2022 at 16:39
  • 1
    you've missed the point. When a task is non interactive, it will NOT make a window. "run when not logged in" means non interactive, which means no window. Commented Jun 9, 2022 at 17:13
  • I believe in what you said. But the thing is, that bat, runs a command that fetches a file from an online platform. The task set to run when I log in works, and the other one does nothing at all... Commented Jun 13, 2022 at 12:49
  • So add some logging to the script, like I suggested. Find out where it's failing. Post the BAT file here. Commented Jun 13, 2022 at 15:54
  • Here is the logging: imgur.com/a/ug6khRm It can't be the bat, because it works when logged, so it had to work on this task too! Commented Jun 14, 2022 at 16:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.