**SPIP**
# Article submitted
The article "**\_DIRECT\_CRON_FORCE**
(https://www.spip.net/ecrire/?exec=article&id_article=6582)" is submitted
for publication. on Monday 8 June 2020.
* * *
## \_DIRECT\_CRON_FORCE
Monday 8 June 2020 , by [jack](.././?page=auteur&id_auteur=593&)
Cette constante permet de forcer l’exécution des tâches CRON en fin de
hit.
The CRON tasks (https://www.spip.net/ecrire/?exec=article&id_article=6581)
to be executed are called up each time a page is viewed by a visitor to the
site. By default, these tasks are executed in the background without making
the user wait. If you want to force the execution of these tasks directly
when the page is displayed, you have to define the following constant in
your file `config/mes_options.php` (See the article dedicated to it
(https://www.spip.net/ecrire/?exec=article&id_article=4909)).
// force the execution, at each page visit, of scheduled routine tasks
define
(http://www.php.net/define)
(
'_DIRECT_CRON_FORCE'
,
true
)
;
This setting allows to restore the operation of CRON tasks in case your
site is protected by a couple of htaccess / htpasswd files.
See also the constant \_HTML\_BG\_CRON\_FORCE
(https://www.spip.net/ecrire/?exec=article&id_article=6583).
— Sent by SPIP (https://www.spip.net/)
