Files
crm.clientright.ru/cron/README-NewCronServiceSetup.txt
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

71 lines
1.9 KiB
Plaintext

To setup a new cron service
===========================
1. Create <ServiceName>.service file, which has the following content at the beginning
<?php
require_once('config.inc.php');
/** Verify the script call is from trusted place. */
global $application_unique_key;
if($_REQUEST['app_key'] != $application_unique_key) {
echo "Access denied!";
exit;
}
/**
* Check if instance of this service is already running?
*/
$svcname = $_REQUEST['service'];
// We need to make sure the PIDfile name is unqique
$servicePIDFile = "logs/$svcname-service.pid";
if(file_exists($servicePIDFile)) {
echo "Service $svcname already running! Check $servicePIDFile";
exit;
} else {
$servicePIDFp = fopen($servicePIDFile, 'a');
}
/**
* Turn-off PHP error reporting.
*/
try { error_reporting(0); } catch(Exception $e) { }
// ... REST OF YOUR CODE ...
// AT END
/** Close and remove the PID file. */
if($servicePIDFp) {
fclose($servicePIDFp);
unlink($servicePIDFile);
}
?>
=====================================================================================================================================
2. Create <ServiceName>Cron.sh file which should have the following:
export VTIGERCRM_ROOTDIR=`dirname "$0"`/..
export USE_PHP=php
cd $VTIGERCRM_ROOTDIR
$USE_PHP -f vtigercron.php service="<ServiceName>" <param>="<value>"
=====================================================================================================================================
3. Create <ServiceName>Cron.bat file which should have the following:
@echo off
set VTIGERCRM_ROOTDIR="C:\Program Files\vtigercrm5\apache\htdocs\vtigerCRM"
set PHP_EXE="C:\Program Files\vtigercrm5\php\php.exe"
cd /D %VTIGERCRM_ROOTDIR%
%PHP_EXE% -f vtigercron.php service="<ServiceName>" <param>="<value>"
=====================================================================================================================================