> For the complete documentation index, see [llms.txt](https://docs.openstamanager.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openstamanager.com/2.8.3/guide/esempi/tasks-programmati.md).

# Tasks programmati

Come gestire le operazioni con OpenSTAManager

{% hint style="info" %}
In OpenSTAManager è stato introdotto il modulo **Gestione Task** per modificare le azioni programmate definite a database in zz\_tasks
{% endhint %}

{% content-ref url="/pages/DSWUataVMdnCXZTHxvnm" %}
[Gestione task](/2.8.3/openstamanager/modules/strumenti/gestione-task.md)
{% endcontent-ref %}

![](https://content.gitbook.com/content/2PiRYHiPQyyI5VSQPG8a/blobs/JT06tcYbXTRdYIFICB4s/immagine.png)

La determinazione del momento in cui verrà eseguita l'operazione viene determinata dall'espressione presente in Expression.&#x20;

Essa è determinata da cinque elementi combinati a caratteri speciali che indicano rispettivamente:

* minuto: 0 - 59
* ora: 0 - 23
* giorno (del mese): 1 - 31
* mese: 1 - 12
* giorno (della settimana): 0 - 6

I caratteri speciali che si possono trovare sono:

* \* -> qualsiasi valore
* , -> separatore di valori in una lista
* \- -> range di valori
* / -> intervallo di valori<br>

E' possibile verificare queste impostazioni in siti che verificano se la configurazione del cron è corretta come ad esempio: <https://crontab.guru/>.

{% hint style="info" %}
**cron.php**: Script dedicato alla gestione delle operazioni di cron ricorrenti del gestionale.\
Una volta attivato, rimane in background per gestire l'esecuzione delle diverse operazioni come pianificate nella tabella zz\_tasks.
{% endhint %}

Il file viene richiamato in automatico al login di un utente.

Per garantire che lo script resti attivo in ogni situazione, si consiglia di introdurre una chiamata nel relativo crontab di sistema secondo il seguente schema:

Schema crontab: "/5 \* \* \* php \<percorso\_root>/cron.php"


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openstamanager.com/2.8.3/guide/esempi/tasks-programmati.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
