> For the complete documentation index, see [llms.txt](https://eaclouddoc.eauditor.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eaclouddoc.eauditor.eu/eacloud-docs-en/features/it-management/tasks/task-execution-and-schedules.md).

# Task execution and schedules

## Running a script

{% stepper %}
{% step %}
Select a script from the library.
{% endstep %}

{% step %}
Click **Run script**.

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FrwKQdqthYYBIJn7iAUL7%2Fimage.png?alt=media&amp;token=f95666fb-baa8-46bc-b037-f80f3d8b956b" alt="Uruchom skrypt." width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Update the script (optional for private scripts)
{% endstep %}

{% step %}
Configure task execution

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FnbswudVek4mgHsdbnUyR%2Fimage.png?alt=media&amp;token=d87be7bc-ad1e-40cd-8f0b-d16f59ef0cf9" alt="Skonfiguruj uruchomienie zadania" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Specify the computers or device groups on which the task is to be executed.

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FLCtM1At8DRuUD9SCfjWz%2Fimage.png?alt=media&amp;token=4010e008-c22a-4b07-abee-1059b09f12a7" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Define the time range during which the script can be executed. After the specified period ends, the script expires and will not be executed.

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2F08CqUFhqC9fx4wmdnID8%2Fimage.png?alt=media&amp;token=54e487d2-f439-4e7c-9b0b-6ac1e12aa238" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Select the script execution context.

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FnCq8ThWQHuxCc1UnFaX4%2Fimage.png?alt=media&amp;token=0a2a3fca-fefe-4c2f-b291-b7162d59eec5" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Run the task immediately, or optionally enable a recurring schedule.

<div align="left"><figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FyTDHkTH945JeLdXpOe27%2Fimage.png?alt=media&amp;token=d8635a3e-c0c3-4f2e-a228-38e81d78c772" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Confirm task execution.
{% endstep %}
{% endstepper %}

### Task permissions

| Option       | Action                                                             |
| ------------ | ------------------------------------------------------------------ |
| Local System | Runs the script with the highest system privileges.                |
| Current user | Executes the script as the user currently logged in on the device. |
| Other user   | Runs the script using the credentials of the specified account.    |

The option **Other user** select when the script must access a protected network resource, for example, a share `\\server\share`to which the Local System account does not have access.

### Script time range

The time range defines when the script can be executed. Outside this period, the task will not be started.

This is especially important for scheduled tasks. If, at the time of execution, the computer is turned off, has no Internet connection, or eAgent cannot connect to the server, the task may remain pending execution.

After reconnection, the computer will execute the task only if it is still within the configured time range. If the script expiration date has passed, the task will not be started.

***Example:** the administrator scheduled the task for the time of the employee's absence. The computer was turned off at that time, and the user returned to work a few days later. By setting an end date, the script will not be started after it is no longer applicable.*

<figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2F6IpSI7RehJ7TGmrQs6K2%2Fimage.png?alt=media&amp;token=4dd1aad7-3d04-45e3-ac76-f6f5a3d23c8f" alt="Zakres czasu skryptu" width="375"><figcaption><p><em>The script activity time range.</em></p></figcaption></figure>

### Recurring schedule

Select the option **Set as a recurring task**to run the script regularly.

Available intervals:

* daily,
* weekly,
* monthly,
* yearly.

For the schedule, you can specify a start date, end date, run indefinitely, or end after a specified number of runs.

<figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FN0rlOw6XyzCOMPhvX2o7%2Fimage.png?alt=media&amp;token=777464b2-561d-4272-b71a-d14ac2296705" alt="Wybór urządzeń, uprawnień i harmonogramu cyklicznego dla skryptu." width="237"><figcaption><p><em>Selection of devices, permissions, and recurring schedule for the script.</em></p></figcaption></figure>

A started task cannot be canceled. The schedule can be edited before the next scheduled operation is executed.

### Logs

After the task is executed, go to the **Logs**tab to check its result, the computer, the date and time of the operation, and the messages returned by the script.

<figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FeyPluO54RTHyUk8sAgFN%2Fimage.png?alt=media&amp;token=a778269d-33eb-4f2e-a17f-0140bf6063f6" alt="Zakładka logi" width="375"><figcaption><p><em>Logs tab.</em></p></figcaption></figure>

After opening the full log, you can use the **Ask AI**function to analyze its content and more easily determine the cause of the error.

<figure><img src="https://3262380731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdzip3GyvGq5q5J3qckWN%2Fuploads%2FbPIOCEhaYvvleUmbPWf1%2Fimage.png?alt=media&amp;token=11d95872-8c6a-4d77-baa2-c4b76f5c62ac" alt="Zapytaj AI" width="375"><figcaption><p><em>Ask AI.</em></p></figcaption></figure>

### FAQ

<details>

<summary>How does a time range differ from a schedule?</summary>

The time range determines when the script is active and can be executed. The schedule determines when the system should attempt to run it.

If the computer is unavailable at the scheduled time, the task may be executed after the connection is restored, but only before the configured end date expires.

</details>

<details>

<summary>Can I cancel a started script?</summary>

No. A task that has already been sent to the computer cannot be canceled.

</details>

<details>

<summary>Can I change the schedule?</summary>

Yes. The schedule can be edited before the next scheduled task is executed.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://eaclouddoc.eauditor.eu/eacloud-docs-en/features/it-management/tasks/task-execution-and-schedules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
