• Register
0 votes
423 views

Problem :

I have scheduled the task to run the SSIS job using my Task Scheduler (TS). It is configured to run as the User who belongs to the Admin group.

The security is to "Run whether user is logged on or not" is checked and  "Dont store password" is checked and  "Run with highest preveilage" is unchecked

Now the scheduled task is run ONLY when my user is logged in but when my user logs out the task does not seem to run. I just figured that "Run whether user is logged on or not" must run my task when my user is not logged on.

Am I missing something? Any clues ?

6 5 3
7,540 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

Generally when I setup any tasks to "run whether user is logged on or not", I take below approach:

I start with creating the user on that computer that he should be the member of no groups. This user is my designated task scheduler user. Now open your Local Security Policy and grant that new user the "Log on as batch job" permission. If you do not then you will get this error: "This task requires that the user account specified has Log on as batch job rights."

So create your task in the Task Scheduler. After that select the "Run whether user is logged on or not" radio button. Then check the "Do not store password" checkbox. You should check the "Run with highest privileges" checkbox. Finally assign your task to run under your new user account.

9 7 4
38,600 points
0 votes

Solution:

At the time you make a SCHEDULED TASK that requires to run automatically you will seclude a service account for the job.  That service account should have permissions to run batches, so Windows will popup “This Task Requires That The User Account Specified Has Log On As Batch Job Rights” as shown on the right.

How to assign a user “Batch Job Rights” Locally

On the local server exercise Local Security Policy manager:

  1. Click On START and type secpol.msc then press Enter

  2. Expand Security Settings > Local Policies > User Rights Assignment node

  3. Double click OnLog on as a batch job

  4. Click On the include User or Group button and include your service account user

  5. Click On OK

  6. Have a nice day, you are done

In case you traced the include button greyed out it is likely since that policy is controlled by a Group Policy:

How to assign a user “Batch Job Rights” through GPO

On a Domain Controller (or anything with the RSAT tools installed) employ Group Policy Management Editor:

  1. Click On START and type Group Policy then click on Group Policy Management

  2. Either edit the subsisting GPO that comprises subsisting USER RIGHTS ASSIGNMENT (likely Default Domain Policy) or right click and CREATE AND EDIT a new policy

  3. Expand Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment node

  4. Double click Log on as a batch job

  5. Click On the Add User or Group button and include your service account user

  6. Click On OK

  7. Have a nice day, you are done

10 6 4
31,120 points

Related questions

0 votes
1 answer 7 views
7 views
Problem: For some reason the group creation works fine and shows as success in the Event Viewer, but when it tries to run the PowerShell script, I get the following error: The user has not been granted the requested logon type at this machine.
asked Mar 20 ummesalma 25.2k points
0 votes
1 answer 108 views
108 views
Problem : I am very new to ASP.Net. I have created my first ASP.Net application which impersonates the user in order to create the AD group, and after that it launches the powershell process as the user saperately. But because of some reason the group ... I would rather not compromise with the security policy with the server ideally, and this application will be used by around 100+ users.
asked Dec 5, 2019 alecxe 7.5k points
0 votes
1 answer 3 views
3 views
Problem: I need someone’s help to fix it... where is task scheduler in windows 7
asked Mar 26 Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem: I'll make a submission for a response to my question. Please, I have searched the internet but have not found any useful material, and I am now having trouble continuing my studies.
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 4 views
4 views
Problem: I am stuck with this ... Please help me that how to deal with this error? This security id may not be assigned as the owner of this object
asked Mar 25 Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem: I am getting the following error: The process was terminated due to an unhandled exception Can anyone shed some light on this for me?
asked Mar 20 ummesalma 25.2k points
0 votes
2 answers 31 views
31 views
Problem: Can anyone give the right solution? Why is the DNS service included in Windows Server 2012 R2 integrated with DHCP service? To allow a DNS server to inform DHCP clients with updated information. To update both DNS and DHCP clients with information from the Active ... to request a DNS server to update or create a record. DNS and DHCP services are not integrated in Windows Server 2012 R2.
asked Feb 22, 2020 maddi86 5.4k points
1 vote
1 answer 589 views
589 views
Problem : We are now running the 32-bit Windows server 2008 with the IIS version of 7. We are trying to publish the asp.net 4.0 webapp but so far our attempts have failed and only yielded the few warnings in our serverlog without even the stopping our 4.0 application ... very badly after that we ran out of the ideas on what to do on our issue so any form of the input would be greatly appreciated.
asked Dec 30, 2019 alecxe 7.5k points
1 vote
1 answer 5 views
5 views
Problem: How to prevent hack attempts. Special privileges assigned to new logon hack.
asked Mar 26 PkGuy 13.1k points
0 votes
1 answer 4 views
4 views
Problem: Can anyone to solve it? Tell me how can I install .net framework 4 client profile stuck
asked Mar 20 Ifra 24.4k points