How to put Bitriksovsky script on the 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
and copied the seo_sitemap_run.php file to sitemap_cron.php and added in the file:
#!/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);