# Granting “Logon as a batch job” permission for Task Scheduler to work

Running Tasks with Task Scheduler is one of most common scenarios in Administrators life. By default you can run your…

blog

23 Mar 2018 pl

[Zobacz obrazy (2)](#pf-content-image-1-0)

Running **Tasks** with **Task Scheduler** is one of most common scenarios in Administrators life. By default you can run your Task as **SYSTEM** which is OK solution if you don't have to access any resources over network. However if you do and you want to run it as specially created domain account for that you need to setup ‘Logon as Batch Job' on Windows. This **privilege** is granted through the **Local** or **Domain Security Policy**. If you don't do that and you try to run the task anyway you will get **Event ID 4625** in **Security** log.

[!\[Podgląd zdarzenia 4625 w dzienniku Security pokazujący błąd logowania z powodu braku uprawnienia Log on as a batch job.\](/wp-content/uploads/2018/03/img_5ab695bf845a5.png)](/wp-content/uploads/2018/03/img_5ab695bf845a5.png)

And in **Task Scheduler** history

[!\[Historia zadań w Task Scheduler pokazująca błędy Task Start Failed i Launch Failure dla zadania uruchamianego bez wymaganego uprawnienia.\](/wp-content/uploads/2018/03/img_5ab69655c6d26.png)](/wp-content/uploads/2018/03/img_5ab69655c6d26.png)

### 💡 Solution – Local Security Policy

To do this using the **Local Security Policy**, follow these steps.

1. In the **Control Panel**, open **Administrative Tools**, then **Local Security Policy**.
2. Beneath **Security Settings**, open **Local Policies** and highlight **User Rights Assignment**.
3. Locate **Log on as a batch job**. Open the properties and add any users that need this right.
4. When finished, save your changes and close the **Local Security Settings** window.

Your changes should take effect immediately.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:E717DC30B0BF2A87AC6D39EAB1F0540DC29221389BC73B49E9B444947B3AE312 -->
