**SPIP**
# Article validated
The article "**\_DIRECT\_CRON_FORCE**
(https://www.spip.net/en_article6582.html)" was validated by
<multi>[ar]جورج[fr]George [en]George</multi>.
* * *
## \_DIRECT\_CRON_FORCE
Tuesday 9 June 2020 , by [jack](.././?page=auteur&id_auteur=593&)
This constant forces the execution of CRON jobs at the end of a hit.
The CRON jobs (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 jobs are executed in the background without making
the user wait. If you want to force the execution of these jobs 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 jobs
define
(http://www.php.net/define)
(
'_DIRECT_CRON_FORCE'
,
true
)
;
This setting allows to restore the operation of CRON jobs 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/)
