# Tasks programmati

{% 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.7.3/openstamanager/modules/strumenti/gestione-task.md)
{% endcontent-ref %}

![](/files/yoSEYkK9OjHt9bR2UC8g)

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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
