Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Scheduled Task Server 2012 only runs in the Run When The User is Logged On mode

Posted on 2016-09-27
4
Medium Priority
?
57 Views
Last Modified: 2016-10-03
I have a task to download the file from a web site
It works perfectly in the Run When the User Logged On Mode, but does not run when I change to Run if The user is logged on or not mode.
The script is simple:
bitsadmin /transfer n http://www.treasury.gov/ofac/downloads/consolidated/cons_prim.del "C:\Program Files (x86)\LegalKEY\ES\002\cons_prim.del"
Also, even in the Run When the User Logged On Mode, the job would not stop running.

I need help configuring this correctly.
0
Comment
Question by:josephdts
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Lionel MM
ID: 41819567
Try adding the "run with highest privileges" option found on the "general" tab at the bottom of that tab
0
 
LVL 71

Assisted Solution

by:Qlemo
Qlemo earned 2000 total points
ID: 41819696
Searching for similar questions reveals that this seems to be an issue since several years - bitsadmin only works reliably in a logged-in session, for whatever reason.
I don't know if the same applies to BITS as such; if not,  the PowerShell BITS cmdlets can be used to run the download, but requires more effort.

The logged-in task however should be finished as soon as the download is. Note that you have to refresh task scheduler display manually to get the most recent status.
0
 

Accepted Solution

by:
josephdts earned 0 total points
ID: 41820106
Yes, the problem definitely is with the bitadmin. I have changed VB Script with System.Net.WebClient to download, and it runs with no issues.
0
 

Author Closing Comment

by:josephdts
ID: 41826029
I have figured myself that my approach with scheduling BITADMIN does not work with Task Scheduler, because BITADMIN itself is a task scheduling utility. I have completely re-written my code with VB Script in order to implement the Job.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Understanding the various editions available is vital when you decide to purchase Windows Server 2012. You need to have a basic understanding of the features and limitations in each edition in order to make a well-informed decision that best suits y…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…

916 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