Added Cron script for MaintenanceNotification emails

This commit is contained in:
Frank Schubert
2024-11-14 21:11:03 +01:00
parent 10d1d8b6a8
commit 09507fc19a

View File

@@ -0,0 +1,21 @@
#!/usr/bin/php
<?php
//require 'vendor/autoload.php';
require("../config/config.php");
define('FRONKDB_SQLDEBUG', false);
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
require_once(LIBDIR . "/mvcfronk/mfRouter/mfRouter.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseModel.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseController.php");
$me = new User(1);
define("INTERNAL_USER_ID", $me->id);
define("INTERNAL_USER_USERNAME", $me->username);
define("MFBASE_BYPASS_LOGIN", true);
foreach(MaintenanceNotification::searchActive([]) as $notification) {
$notification->sendToRecipients();
}