#!/bin/bash

while true; do
    clear
    echo "======================================================"
    echo "   OLT Sync Process Started at: $(date '+%Y-%m-%d %H:%M:%S')"
    echo "======================================================"
    
    # Run the python scraper script
    /usr/bin/python3 /var/www/dev-erp.backend.shadhinwifi.com/scraper.py
    
    echo ""
    echo "======================================================"
    echo "   Sync Finished. Waiting 120 seconds..."
    echo "======================================================"
    
    # Wait for 120 seconds before the next execution
    sleep 120
done
