The technique can vary from setup to setup so I'm not surprised there isn't a one-size-fits-all solution out there.
crontab -e
Code:
00 4 * * * /usr/bin/php /opt/eqemu/server/doshutdown.php
10 4 * * * /opt/eqemu/server/stopall && /root/cacheclean.sh && /opt/eqemu/server/startall &
doshutdown.php
Code:
<?php
//Server broadcast
$baseurl = "http://username:password@[localhost|servername|ip]:9080/worldshutdown.html";
$dext = "?time=600&interval=60";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $baseurl.$dext);
curl_exec($ch);
curl_close($ch);
?>
worldshutdown.html - put in the templates folder for the server's http interface
Code:
<?
$stime = $request->get("time", "600");
$sinterval = $request->get("interval", "60");
$EQW->WorldShutDown($stime, $sinterval);
?>