up
This commit is contained in:
@@ -115,9 +115,9 @@ if [ -f /usr/local/bin/php ]; then
|
||||
php -r "if(function_exists('opcache_reset')) opcache_reset();"
|
||||
fi
|
||||
|
||||
# Configurar crontab para tareas programadas
|
||||
# Configurar crontab para tareas programadas (usar /etc/crontabs/root para que crond lo ejecute como root)
|
||||
echo "⏰ Configurando cron jobs..."
|
||||
cat > /etc/crontabs/www <<EOF
|
||||
cat > /etc/crontabs/root <<EOF
|
||||
# Procesar mensajes delayed cada minuto
|
||||
* * * * * cd /var/www/html && /usr/local/bin/php -r "require 'vendor/autoload.php'; use WhatsApp\Queue\RedisQueue; \$q = new RedisQueue(); \$q->processDelayed('messages'); \$q->processDelayed('media');" 2>&1 | logger -t delayed-processor
|
||||
|
||||
@@ -130,7 +130,6 @@ cat > /etc/crontabs/www <<EOF
|
||||
# Health check de workers (cada 5 minutos)
|
||||
*/5 * * * * supervisorctl status whatsapp-worker:* | grep -q RUNNING || supervisorctl restart whatsapp-worker:* 2>&1 | logger -t worker-monitor
|
||||
EOF
|
||||
chown www:www /etc/crontabs/www
|
||||
|
||||
echo "✅ Configuración completada"
|
||||
echo "🎯 Iniciando servicios..."
|
||||
|
||||
Reference in New Issue
Block a user