• Batch file question

    From Argos@21:1/203 to All on Sun Aug 18 19:19:06 2019
    I have a batch file that calls a few Telnet scripts to pull down the local weather report. It is calling a script to telnet in to rainmaker.wunderground.com.

    If I run this batch command stand alone it works perfect and produces the
    files no issues. I tried to place this in mystic config > event editor and
    set it up as a hourly and a shell event with the path to run the.BAT and it does not run. All I get in the logs is Event Result:1 .... This I cam
    guessing is failed.

    Is it possible to run a batch file outside of Mystic? All this batch does is runs a telnet script pull down the local weather and then place that text
    file in a directory.

    Here is the Batch file...

    @echo off
    Call TIXWeather.bat
    Call TIXScrub.bat
    Call MLBWeather.bat
    Call MLBScrub.bat
    Copy /Y Tixforcast.msg c:\mystic\gfiles\forcast
    copy /Y Mlbforcast.msg C:\mystic\gfiles\forcast

    On Mystic BBS I created a new Menu with an item selection to display the
    files option 1 and option 2.

    If I manually run the batch file, and the files are in the directory. the
    text file weather report runs just fine.

    Ricky
    aka Argos
    Rocket Town BBS - Telnet: rtbbs.ddns.net
    fsxnet: 21/1/203 - Titusville, Florida - NASA Space Coast

    --- Mystic BBS v1.12 A43 2019/03/03 (Windows/32)
    * Origin: Rocket Town BBS (21:1/203)
  • From jeff@21:1/180 to Argos on Sun Aug 18 18:42:45 2019
    On 18 Aug 2019, Argos said the following...
    If I run this batch command stand alone it works perfect and produces the files no issues. I tried to place this in mystic config > event editor and set it up as a hourly and a shell event with the path to run the.BAT and it does not run. All I get in the logs is Event Result:1 .... This
    I cam guessing is failed.
    The first thing I'd check is the path to the executable. You might have to spell everything out with absolute path names.

    Is it possible to run a batch file outside of Mystic? All this batch
    does is runs a telnet script pull down the local weather and then place that text file in a directory.
    Sure. You can use the Windows Task Scheduler for this.

    Jeff.

    --- Mystic BBS v1.12 A43 2019/03/03 (Raspberry Pi/32)
    * Origin: Perceptronica (21:1/180)
  • From Al@21:4/106 to Argos on Sun Aug 18 16:49:34 2019
    If I run this batch command stand alone it works perfect and produces the files no issues. I tried to place this in mystic config > event editor and set it up as a hourly and a shell event with the path to run the.BAT and it does not run. All I get in the logs is Event Result:1 .... This I cam guessing is failed.

    Yep, the result:1 means that it is trying to run but failing.

    Is it possible to run a batch file outside of Mystic? All this batch does is runs a telnet script pull down the local weather and then place that text file in a directory.

    Here is the Batch file...

    @echo off
    Call TIXWeather.bat
    Call TIXScrub.bat
    Call MLBWeather.bat
    Call MLBScrub.bat
    Copy /Y Tixforcast.msg c:\mystic\gfiles\forcast
    copy /Y Mlbforcast.msg C:\mystic\gfiles\forcast

    On Mystic BBS I created a new Menu with an item selection to display the files option 1 and option 2.

    I'm not sure why it fails.

    Maybe adding a cd \path will help to be sure it's in the right directory when it runs.

    --- BBBS/Li6 v4.10 Toy-4
    * Origin: The Rusty MailBox - Penticton, BC Canada (21:4/106)
  • From jeff@21:1/180 to Argos on Sun Aug 18 19:02:09 2019
    On 18 Aug 2019, Al said the following...
    If I run this batch command stand alone it works perfect and produces th files no issues. I tried to place this in mystic config > event editor set it up as a hourly and a shell event with the path to run the.BAT and does not run. All I get in the logs is Event Result:1 .... This I cam guessing is failed.
    Yep, the result:1 means that it is trying to run but failing.
    Yep, but just to clarify, Mystic has no way of knowing whether your batch file did what you intended it to do or not. All Mystic knows is whether the batch file executed or not when it tried to invoke it. So if Mystic ran the batch file but the batch file failed to telnet anywhere, reformatted your hard
    drive, and set the printer on fire, Mystic would still report success.

    It's reporting failure, though, which I'm guessing means that the batch file never even ran.

    Jeff.

    --- Mystic BBS v1.12 A43 2019/03/03 (Raspberry Pi/32)
    * Origin: Perceptronica (21:1/180)
  • From Argos@21:1/203 to jeff on Mon Aug 19 20:33:42 2019
    On 18 Aug 2019, jeff said the following...

    On 18 Aug 2019, Argos said the following...
    If I run this batch command stand alone it works perfect and produces files no issues. I tried to place this in mystic config > event edit and set it up as a hourly and a shell event with the path to run the. and it does not run. All I get in the logs is Event Result:1 .... Th I cam guessing is failed.
    The first thing I'd check is the path to the executable. You might have
    to spell everything out with absolute path names.

    Is it possible to run a batch file outside of Mystic? All this batch does is runs a telnet script pull down the local weather and then pla that text file in a directory.
    Sure. You can use the Windows Task Scheduler for this.

    Jeff.

    --- Mystic BBS v1.12 A43 2019/03/03 (Raspberry Pi/32)
    * Origin: Perceptronica (21:1/180)
    Thanks Jeff .. Made some changes and place this into Windows Task Scheduler. Working like a champ.

    ~ Ricky aks Argos
    21:1/203

    Ricky
    aka Argos
    Rocket Town BBS - Telnet: rtbbs.ddns.net
    fsxnet: 21/1/203 - Titusville, Florida - NASA Space Coast

    --- Mystic BBS v1.12 A43 2019/03/03 (Windows/32)
    * Origin: Rocket Town BBS (21:1/203)