Facility Control

 View Only
  • 1.  scheduling a custom control to run at a certain time using Dashboard

    Posted 01-21-2022 14:47

    we are using QuickTurn to do archival recordings of student-run newscasts. I've created custom controls using switcher events to enable & disable QuickTurn. Would there be a way to create a schedule that activates the 2 customs?

    For example, the show begins at 6:00p... set through dashboard, at 5:59p, the custom that enables QuickTurn is activated... later at 6:30p when the show ends, again through dashboard, at 6:31p, the custom to disable QuickTurn is activated.

    Thanks so much!

    Bobby P

  • 2.  RE: scheduling a custom control to run at a certain time using Dashboard

    Ross Staff
    Posted 01-27-2022 10:47
    You can create panels that trigger things at specific times.   Here is a panel that runs a task at a specific time later in the day:

    <abs contexttype="opengear" gridsize="20" id="_top" keepalive="false" style="">
    <param access="1" maxlength="0" name="delay (seconds)" oid="delay" type="STRING" value="15:08:00" widget="time-picker"/>
    <label height="60" left="40" name="Running Tasks at Specific Times" style="txt-align:west;size:Bigger;" top="40" width="620"/>
    <label height="20" left="40" name="You can code a task to run at a specific time. See the code in the button for an example." style="txt-align:west;" top="100" width="1100"/>
    <table height="40" left="40" oid="delay" top="160" width="200">
    <label anchor="east" fill="none" insets="0,0,0,5" name="Run task at time:" weightx="0.0"/>
    <param anchor="west" expand="true" fill="both" oid="delay" showlabel="false" weightx="1.0" weighty="1.0"/>
    <button buttontype="push" height="40" left="40" name="Run Task" top="200" width="200">
    <task tasktype="ogscript">function runTask() {
    var date = new Date();
    ogscript.rename("message", "task triggered on " + date);

    var date = new Date();
    var time = params.getValue("delay",0);
    var timeArray = time.split(":");

    var now = new Date();
    var delay = date.getTime()- now.getTime();
    if (delay &lt; 0) {
    ogscript.rename("message", date + " is in the past");
    } else {
    ogscript.rename("message", "running on " + date)
    ogscript.asyncExec(runTask, delay);
    <label height="40" id="message" left="260" name="message" style="txt-align:west;bg#dark;" top="160" width="440"/>
    <label height="40" left="260" name="This panel only runs tasks that are later today. It could be enhanced to run tasks at a later date too." style="txt-align:west;" top="200" width="620"/>

    You could adapt it to run things every day if needed.  Take a look and let me know if you have any questions.

    Ross also sells a product called PowerPlay to schedule sending messages to DashBoard panels (and other devices).

    Ben Gatien
    Ross Video