Answer the question
In order to leave comments, you need to log in
How to put Bitrix script on cron?
How to put a Bitrix script on cron? Namely, I want the sitemap generation to run every day at 11 am. Now in the /etc/crontab file I wrote:
00 11 * * * bitrix test -f /home/bitrix/www/bitrix/modules/seo/admin/sitemap_cron.php && { /usr/bin/php -f /home/bitrix/www/bitrix/modules/seo/admin/sitemap_cron.php ; } >/dev/null 2>&1
#!/usr/bin/php
$_SERVER["DOCUMENT_ROOT"] = "/home/bitrix/www";
$DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
set_time_limit(0);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question