<?php

require_once '../core/api_bootstrap.php';

try {

$db = new Database();
$conn = $db->connect();

/* delete yesterday usage */

$conn->exec("

DELETE FROM provider_lead_usage
WHERE usage_date < CURDATE()

");

echo "Daily lead usage reset";

}
catch(Exception $e){

Logger::log("cron.log",$e->getMessage());

}
