<?php
require_once __DIR__.'/../includes/functions.php';
mj_automation_ensure_schema();
$force = isset($_GET['force']) && $_GET['force']=='1';
$res = mj_automation_run_all($force);
header('Content-Type: text/plain');
echo "MJ Marketplace Automation Runner\n";
echo "Actions: ".$res['actions']."\n";
echo "Errors: ".$res['errors']."\n";
foreach($res['items'] as $item){ echo $item['key'].": actions=".$item['actions']." errors=".$item['errors']."\n"; }
