Run template at server startup

Hi
Was not sure how to search for this so I ask instead
I have the need of running a template/command automatically when the server is started without any human effort
So I run this startup-script

@Echo off

IF EXIST scanner.exe (
    IF EXIST leveldown.node (
        start scanner.exe
    )
)

:Start
SET ERRORLEVEL 0

casparcg.exe 2NDI_D_ASSETS.config

if ERRORLEVEL 5 goto :Start

And I need the server to run this command after it has started

PLAY 1-20 [HTML] “https://127.0.0.1:5000/renderer/

Is it doable?

br markus

Puting this file in casparcg server folder and running it works.
https://drive.google.com/file/d/1MMNL28cn5o0uvNP3gwf_JW9GpNsdThNe/view?usp=sharing

This is vb script file dd.vbs containing:-

set WshShell = WScript.CreateObject("WScript.Shell")
 WshShell.run"casparcg.exe casparcg.config"
 WScript.Sleep 1500
 WshShell.run"telnet.exe 127.0.0.1 5250"
 WScript.Sleep 1500
 WshShell.SendKeys"play 1-1 amb loop"
 WshShell.SendKeys("{Enter}")

Thanks it worked
Had some problem with the url but I did get it to work
my wbs file looks like this

set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.run"casparcg.exe 2NDI_D_ASSETS.config"
WScript.Sleep 1500
WshShell.run"telnet.exe 127.0.0.1 5250"
WScript.Sleep 1500
WshShell.SendKeys “play 1-20 [HTML] http://172.25.240.1:5000/renderer/
WshShell.SendKeys("{Enter}")

1 Like

You could use CasparLauncher GitHub - rrebuffo/CasparLauncher: Frontend app for CasparCG Server

It allows startup commands

Privacy Policy   Terms of Service