how to run task scheduler only once no matter how many sessions are logged on

kodman 0 Reputation points
2023-07-18T06:56:59.15+00:00

OS : Windows Server 2012 R2 Standard

Hi, I'm trying to run some scripts via task scheduler.

Here's my specification.

  • The trigger fires every one hour, and sometimes one execution could run longer than 1 hour.
  • To deal above mention, I have to set "Queue a new instance".

But I found out the task ran two times every period, and the multiple execution is caused by the number of logged on sessions. There were two 'Administrator' sessions that are logged on.

When I turned log-off one session, then task ran only once, and this is what I exactly wanted.

But I can't maintain to make only one session is logged on always.

How can I resolve this problem?

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,516 Reputation points
    2023-07-18T07:00:40.44+00:00

    I don't understand your problem. "Task Scheduler" is a Windows Service and runs once per Server, even if no user is loggeg on; it don't run per user.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.