S
S
Shenku2020-11-03 11:36:30
1C-Bitrix
Shenku, 2020-11-03 11:36:30

How to install Bitrix agents on cron using ISPmanager?

Good day. I did everything according to the manual created /bitrix/php_interface/cron_events.php

$_SERVER["DOCUMENT_ROOT"] = realpath(dirname(__FILE__)."/../..");
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];

define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS",true);
define('BX_NO_ACCELERATOR_RESET', true);
define('CHK_EVENT', true);
define('BX_WITH_ON_AFTER_EPILOG', true);

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");

@set_time_limit(0);
@ignore_user_abort(true);

CAgent::CheckAgents();
define("BX_CRONTAB_SUPPORT", true);
define("BX_CRONTAB", true);
CEvent::CheckEvents();

if(CModule::IncludeModule('sender'))
{
    \Bitrix\Sender\MailingManager::checkPeriod(false);
    \Bitrix\Sender\MailingManager::checkSend();
}

require($_SERVER['DOCUMENT_ROOT']."/bitrix/modules/main/tools/backup.php");
CMain::FinalActions();


in ISPmanager in the scheduler I wrote the following command /usr/bin/php7.4 -f /var/www/www-root/data/www/cp.su-vide.ru/bitrix/php_interface/cron_events.php

as a result in the admin panel a warning pops up
"Monitoring the launch of the script as root (script: /var/www/www-root/data/www/cp.su-vide.ru/bitrix/php_interface/cron_events.php, time: 03.11.2020 10:29: 06)."

bitrix TP answered: Most likely, they did not launch the cron task with the correct rights.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-11-03
@shambler81

1 script from root do not run, if it creates files, then they are also from root, as a result, there is a problem with the owner and group.
2. run better not through /usr/bin/php.. but through wget or curl because it uses not a local environment, but something that belongs to the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question