Cloverleaf Timer based functions

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Cloverleaf Timer based functions

  • Creator
    Topic
  • #52773
    Daniel Lee
    Participant

      Cloverleaf 5.8

      AIX 6.1

      We want to create a method in Cloverleaf to create a log file of exception information for transactions that cross a given interface.  At midnight, we want to email that log and archive the current log file to a backup file archive.  An example of this is logging all the patient names that try to cross an interface that are over 30 characters long.

      I am able to achieve all of the above with one problem, I have to use the AIX cron to schedule the file to be emailed and midnight and store it off to the archive.  Is there a way to do this in Cloverleaf?  I

    Viewing 7 reply threads
    • Author
      Replies
      • #75428
        Robert Kersemakers
        Participant

          Hi Daniel,

          Ik have never done that either as we do use cron for this. Not sure what’s wrong with that, apart from the fact that you have to ask one of the OS-guys (I have read other desciptions for these guys on this forum  :twisted:).

          But you could try to create an alert that is always true at a certain time of day. I would use ‘outbound queue depth’ < 10000 for a duration of 2 minutes at the specified time (hour 00) with a timeframe of 3 minutes (minutes: 00-01). This should make the alert fire only once at about 00:01. And there should be a thread somewhere that you can use for this.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #75429
          Daniel Lee
          Participant

            That’s an idea.  The only aversion I have to using the cron is that when I start using aix scripts and cron jobs and network shares (i.e. functionality outside of Cloverleaf) it makes it hard to remember everything when you do a server migration.  The depatment I’m writting this code for is also insistant that I use Cloverleaf for all the componants of the interface and not the cron.

          • #75430
            Jim Kosloskey
            Participant

              Dan,

              How about setting up a Fileset/local Protocol thread to kick off at the appointed time and do the email, archive the log file, whatever. That has the same scheduling capability as cron.

              Never done that but on the surface that sounds to me like it might be an avenue to explore.

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

            • #75431
              Daniel Lee
              Participant

                What if I create a read UPOC thread that uses advanced scheduling.  The thread would simply wake up at a certain time, kick off a TCL that picks up the exception files, emails them to the intended user, and writes them to an archive.  I’d leave my route blank and kill every message in the TPS inbound data UPoC.

                Does anyone see any issues with that?

              • #75432
                Daniel Lee
                Participant

                  What if I create a read UPOC thread that uses advanced scheduling.  The thread would simply wake up at a certain time, kick off a TCL that picks up the exception files, emails them to the intended user, and writes them to an archive.  I’d leave my route blank and kill every message in the TPS inbound data UPoC.

                  Does anyone see any issues with that?

                • #75433
                  Daniel Lee
                  Participant

                    Jim,

                    It looks like you wrote you’re reply at the same time as I wrote mine.  Is there a reason why I would use fileset local over a upoc thread?  Also, do you see a problem in not having a route defined as long as I’m killing all the messages in TPS inbound data?

                  • #75434
                    Jim Kosloskey
                    Participant

                      Dan,

                      Whether to use a UPoC protocol or fileset/local is based on your needs – I don’t know enough to advise you there.

                      As to no routes there should be no problem if you are assured you do KILL every message. Just be safe, what is wrong with routing the messages to a file protocl outbound thread pointed to dev/null with SMAT turned on? This will archive the messages in SMAT for you automatically as well as effectively KILL the messages.

                      If you don’t want to use the outbound thread for archiving, you could use the thread to catch any messags you missed and set up some sort of mechanism for letting you know this occured (of course you could just let them faile with an invalid TrxId as well).

                      Your choices.

                      email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.

                    • #75435
                      Daniel Lee
                      Participant

                        Thanks Jim, very good ideas.

                    Viewing 7 reply threads
                    • The forum ‘Cloverleaf’ is closed to new topics and replies.