#!/bin/bash
# WebCrawlers Automation Queue Processor
# Run this periodically via cron (e.g., every 5 minutes)
# Example: */5 * * * * /home/koushik/webcrawlers_cron.sh

cd /var/www/php82/koushik/webcrawlers_latest.com

# Process up to 10 pending jobs
/usr/bin/php8.2 spark automation:process --limit=10 >> /var/www/php82/koushik/webcrawlers_latest.com/writable/logs/automation_queue.log 2>&1

exit 0
