Schedule and rename of fileset local file

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Schedule and rename of fileset local file

  • Creator
    Topic
  • #52338
    Carol Mainhardt
    Participant

      Hi

          I am trying to create an HL7 adt batch file that will be created and named with the date and time once a day at a specified time.  I have the messages translated correctly and they are being appended to the file but I can’t seem to locate any information on how to schedule and name the file.  Any help would be greatly appreciated.  Thanks.

    Viewing 1 reply thread
    • Author
      Replies
      • #73859
        Craig Weldy
        Participant

          What is the OS you are working on?  We use AIX and on these types of interfaces I setup a cron job.  The job will call a script the will :

             1) halt the outbound thread.

             2) shut down the outbound thread.

             3) rename the output file to whatever you want it named or time date stamped.

             4)  Process the file.  FTP it or move it to the directory it needs to be in.

             5)  Start the outbound thread back up.

          Craig Weldy
          Senior Interface Analyst
          Beacon Health System
          South Bend, In, 46615

        • #73860
          Scott Folley
          Participant

            You could do that or you could aggregate the messages into a file that you are appending to throughout the day and use a timer based thread to send a “close” message to the outbound thread at the specified time.  That close message could look like just about anything as long as your outbound-TPS on the outbound thread can identify it as a close message.  When that message arrives, you add your batch header and trailer if you need to and then rename it according to the necessary naming convention.  The thing that I like about this solution is that the outbound thread can stay up all of the time and you can keep the logic within the engine.  I love cron but if I can do it within the engine then that is my preference.

        Viewing 1 reply thread
        • The forum ‘Tcl Library’ is closed to new topics and replies.