Announcement

Collapse
No announcement yet.

Database Reader with Cron-Scheduler polls multiple times

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database Reader with Cron-Scheduler polls multiple times

    Hello everyone,

    i created a Database-Reader (Oracle) with a cron-scheduler. The Destination is an CSV-file located on an windows-share with append-policy.

    When the database-reader starts polling, it seems that the sql-query is executed multiple times, not just once. With option set "poll once at start", the results are polled once as expected. When the cron-scheduler is at work, the results are polled multiple times again.

    With the interval-scheduler this behaviour seems not to be the case, but that's not what I need.

    I can't get my head around this. Any suggestions?

    mirth 3.3.2
    Windows 7 x64
    MS SQL-Server 2014 Express x64
    channel-config is attached
    Attached Files

  • #2
    The first cron expression you're using is "* 0,30 12-16 * * ?". That's going to execute once every second during the 0th and 30th minute, during the hours of 12-4 PM. I think instead you want something like this:

    Code:
    0 0,30 12-16 * * ?
    That will execute only on the 0 second mark of the 0th and 30th minutes of hours 12-4 PM. Similarly, you may want to change your second expression to this:

    Code:
    0 0 7 * * ?
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      oh boy, i'm an idiot -.-

      thank you!

      Comment


      • #4
        CRON Suggestion

        So if I wanted the reader to fire daily at 7:40 AM, would this be the correct syntax?

        0 40 7 * * ?
        Best,

        Kirby

        Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

        Appliance Version 3.11.4
        Mirth Connect Version 3.8.0
        Java Version 1.6.0_45-b06
        Java (64 bit) Version 1.6.0_45-b06
        Java 7 (64 bit) Version 1.7.0_151-b15
        Java 8 (64 bit) Version 1.8.0_181-b13
        PostgreSQL Version 9.6.8

        Comment


        • #5
          if you mouse over that interval section, you'll see it's got a helper associated with it. I use the unix crontab manpage for help, but then again, that doesn't have seconds resolution - be aware of that.

          Short answer is that your 7:40am crontab is correct.

          Comment


          • #6
            Thanks for the confirmation Jack.

            For others, I found these resource while researching this today.

            http://www.adminschoice.com/crontab-quick-reference
            Best,

            Kirby

            Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

            Appliance Version 3.11.4
            Mirth Connect Version 3.8.0
            Java Version 1.6.0_45-b06
            Java (64 bit) Version 1.6.0_45-b06
            Java 7 (64 bit) Version 1.7.0_151-b15
            Java 8 (64 bit) Version 1.8.0_181-b13
            PostgreSQL Version 9.6.8

            Comment


            • #7
              Yes that's correct, but if you're doing something as simple as "daily at 7:40" then you don't even need the Cron option. Just use the "Time" option, which behaves the same way it did in 3.2 and earlier.
              Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

              Nicholas Rupley
              Work: 949-237-6069
              Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


              - How do I foo?
              - You just bar.

              Comment


              • #8
                The requirement is to send every day at 8AM, noon and 7PM.
                Best,

                Kirby

                Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

                Appliance Version 3.11.4
                Mirth Connect Version 3.8.0
                Java Version 1.6.0_45-b06
                Java (64 bit) Version 1.6.0_45-b06
                Java 7 (64 bit) Version 1.7.0_151-b15
                Java 8 (64 bit) Version 1.8.0_181-b13
                PostgreSQL Version 9.6.8

                Comment

                Working...
                X