Announcement

Collapse
No announcement yet.

Scheduled task does not run in an inactive terminal services session

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scheduled task does not run in an inactive terminal services session

    I have a scheduled task that runs a BAT file every day. The BAT file uses Xcopy to copy files to a UNC path and then it sends an email notification using Blat (its a lightweight command line email program).

    When I run the bat file, it all works as expected.

    When I run the scheduled task manually (or scheduled it to run whilst I am logged in to the terminal services session) it runs fine.

    However, if I schedule it to run after I close the terminal services session, it fails. It fails with the following message:

    Code:
    The operator or administrator has refused the request.
    I have tried running it as administrator and also as the system account, and I have also ticked the box that says "Run with the highest possible privilages".

    Any ideas anyone?
    David Silvester
    Systems Administrator

  • #2
    Re: Scheduled task does not run in an inactive terminal services session

    Is the following option selected:
    Attached Files

    Comment


    • #3
      Re: Scheduled task does not run in an inactive terminal services session

      Originally posted by joeqwerty View Post
      Is the following option selected:
      yes, that is set.
      David Silvester
      Systems Administrator

      Comment


      • #4
        Re: Scheduled task does not run in an inactive terminal services session

        Hi - I have identical issue and cannot resolve it. Did you get this fixed? If so what did you do?

        Thanks!

        Comment


        • #5
          Re: Scheduled task does not run in an inactive terminal services session

          Hi, have you tried using a domain account that has modify permissions to the destination UNC path? And maybe in the local admin group of the server too for testing.
          Please remember to award reputation points if you have received good advice.
          I do tend to think 'outside the box' so others may not always share the same views.

          MCITP -W7,
          MCSA+Messaging, CCENT, ICND2 slowly getting around to.

          Comment


          • #6
            Re: Scheduled task does not run in an inactive terminal services session

            Please try to use a windows / domain account with local Administrator privilege.
            If this wouldn't help, try to add the following privileges:
            Run as local service
            Run as a batch file
            Best Regards,

            Yuval Sinay

            LinkedIn: https://www.linkedin.com/in/yuval14, Blog: http://blogs.microsoft.co.il/blogs/yuval14

            Comment


            • #7
              Re: Scheduled task does not run in an inactive terminal services session

              Are you closing the terminal session or logging out? If you are logging out, you are effectively turning off that session. It's like scheduling a task to run on a computer after you've powered it off. You can X out of it (disconnect), which will leave the user account logged in to that session to keep it alive, but unless I'm mistaken, logging out of RDP = powering down.

              Comment

              Working...
              X