Run Command Possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msgBldr
    Enthusiast
    • Dec 2009
    • 22

    Run Command Possible?

    I use BC to sync and mirror a lot of things every day. It's automated with Splinter Scheduler and works very well.

    I'm in the process of creating an integrated log for ALL of the mirror and sync jobs so I can see it in one place. I would like to tie this to success or failure of the BC script.

    What I have done so far is write a line that works for me to file x.txt and then have BC write a short log to the same file. Works OK.

    I would really like to be able to write my own line from the BC script. There are a couple of ways to do this:

    Allow a "Run" command to execute outside code. For example:
    Run my.exe /xx "my parms"

    Another option might be to have a WriteLog command that would create a line in the log. For example,
    WriteLog "My text goes here"
    would create an entry in the log like this:
    9/25/2011 14:09:54 My text goes here

    Any possibility of either of these options?

    tia... Bob
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    You can actually include the custom text using a combination of command line parameters and Comments.

    First, you can place the custom text as part of the command line call:
    bcompare.exe @script "Hello, World!"

    Next, your script can have Comments by having a # at the beginning of the line. Comments are still included in the log. Enter this line in the script.txt:
    # %1

    And it will appear in the log as:
    >> # Hello, World!
    Aaron P Scooter Software

    Comment

    • msgBldr
      Enthusiast
      • Dec 2009
      • 22

      #3
      Awesome! Works great.

      So, let no good deed go unpunished.

      Is there a way to introduce some sort of delimiter between the sections of the log line? It's really not possible to easily parse the time/date/info into excel.

      An example, what I now get:
      9/27/2011 12:37:02 >> # Mirror BobBob2 to Mickey U
      ...
      9/27/2011 12:37:02 >> load "MyDocs --> Y:\MirrorMyDocs"
      9/27/2011 12:37:07 Load comparison: D:\ <-> Y:\MirrorMyDocs

      What I would like to see:

      9/27/2011,12:37:02, >> # Mirror BobBob2 to Mickey U
      ...
      9/27/2011,12:37:02, >> load "MyDocs --> Y:\MirrorMyDocs"
      9/27/2011,12:37:07, Load comparison: D:\ <-> Y:\MirrorMyDocs

      The comma could be anything like tab or whatever. Optimal would be user selected.

      THANKS.... Bob

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16017

        #4
        We don't have a method for this, but our date and timestamp structure is consistent. It'll always start the line, and end with a \d\d:\d\d:\d\d >>. Would that be enough information to parse out our timestamp vs. rest of the line, and then parse more of the timestamp if necessary?
        Aaron P Scooter Software

        Comment

        • msgBldr
          Enthusiast
          • Dec 2009
          • 22

          #5
          Hi Aaron,

          Once I had the ability to insert comments all the other problems went away.

          Thanks for coming back to this and a GREAT PRODUCT.

          ...Bob

          Comment

          Working...