Schedule layout with mysql update cmd

Hi guys,
i’m running xibo 1.8.2 without Docker on a Webserver.
Is it possible to run a layout with a mysql update command?

Background: I’ve 10 displays with a location overview running as default layout. I’m sending a http cmd over GIRA HomeServer (KNX-Instabus) to a php file on the webserver that should schedule a black layout if nobody is in the building. The layout is stored in the timetable with past schedule informations and should be updated with the php-file. The beta-update File is in the quote.

All commands are executed like they should, but the displays won’t update itself. Is it possible to do that this way?

thx for response

<?php //db-connection

$cmd_xibo = $_GET[“setlock”];
$event1id = $_GET[“event1id”];
$event2id = $_GET[“event2id”];
$get_time = time();
$add_time = time()+43200;
$add2_time = time()+60;
$minus_time = time()-120;

if($cmd_xibo == “1”)
{
$sql1 = “UPDATE db.schedule SET FromDT = ‘$add2_time’, ToDT = ‘$add_time’ WHERE schedule.eventID = ‘$event1id’;”;
$sql2 = “UPDATE db.schedule SET FromDT = ‘$add2_time’, ToDT = ‘$add_time’ WHERE schedule.eventID = ‘$event2id’;”;
$sql3 = “UPDATE display SET MediaInventoryStatus = 3”;

mysql_query($sql1);
mysql_query($sql2);
mysql_query($sql3);
}

if($cmd_xibo == “0”)
{
$sql4 = “UPDATE db.schedule SET FromDT = ‘$minus_time’, ToDT = ‘$add2_time’ WHERE schedule.eventID = ‘$event1id’;”;
$sql5 = “UPDATE db.schedule SET FromDT = ‘$minus_time’, ToDT = ‘$add2_time’ WHERE schedule.eventID = ‘$event2id’;”;
$sql6 = “UPDATE display SET MediaInventoryStatus = 3”;

mysql_query($sql4);
mysql_query($sql5);
mysql_query($sql6);
?>

It might be possible, if all those files that should be executed are in the /userscripts in your docker instillation.

That being said, we do not recommend running that directly on the database, I’d suggest using API instead.