You can do this via GSC scripts:
With libcod:
https://killtube.org/showthread.php?3153-callback-RCON
Without libcod:
PHP Code:
level endon("intermission");
setCvar("customcommand1", ""); // can be set via rcon as: /rcon customcommand1 value instead of /rcon set customcommand1 value
for (;;)
{
if (getCvar("customcommand1") != "") {
setCvar("customcommand1", "");
customcommand1();
}
wait 0.05;
}
customcommand1()
{
}