| import time
|
| import subprocess
|
| import sys
|
| import os
|
|
|
| def run_scraper():
|
| print(f"\n[{time.strftime('%Y-%m-%d %H:%M:%S')}] Starting data aggregation...")
|
| try:
|
|
|
| subprocess.run([sys.executable, "aggregator.py"], check=True)
|
|
|
| subprocess.run([sys.executable, "ai_training_scraper.py"], check=True)
|
| print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] All scrapers ran successfully.")
|
| except Exception as e:
|
| print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] Aggregation failed: {e}")
|
|
|
| if __name__ == "__main__":
|
| print("Firstify Auto-Scheduler Started.")
|
| print("Interval: 60 minutes")
|
|
|
|
|
| run_scraper()
|
|
|
| while True:
|
|
|
| time.sleep(3600)
|
| run_scraper()
|
|
|