Files
api/cron/SyncBookings.php
T
Jepp9350 d3e9391160 Add new cron tasks and enhance user synchronization logic
Introduced cron tasks for syncing user economic customer details and discounts. Enhanced caching mechanisms for users and departments, added Slack messaging capabilities, and updated CLI/script routing for better flexibility. New routes and utility methods improve cron execution and logging.
2025-01-24 13:04:10 +01:00

22 lines
528 B
PHP

<?php
/**
* This script is used to sync bookings from the remote API to the local database.
* It is run as a cron job.
*
* index.php run bookingSync
*/
// prevent direct access
use objects\bookings_o;
if (!defined('WD')) {
exit;
}
$start = microtime(true);
// Sync the bookings
$bookings_o = new bookings_o();
$bookings_o->syncBookings();
$end = microtime(true);
//$slack = new \classes\slack();
//$slack->send_message("The booking sync script has finished. It took " . round($end - $start, 2) . " seconds to run.");