Announcement

Collapse
No announcement yet.

CRON-enabled reader channel runs continuously for 20 minutes

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

  • CRON-enabled reader channel runs continuously for 20 minutes

    I have set up a reader channel that reaches out to an SFTP site and gets all of the files available and saves them to the local disk. It is set to engage at 1:45 PM every Monday, according to my cron expression:

    0 45 13 ? * MON *

    It starts just fine, but it runs again and again until about 2:07 or so, about 340 times IIRC. Maybe my cron expression is too vague, but it seems to me it should really only run once.

    I've attached my channel.
    Attached Files

  • #2
    How are you verifying that it runs multiple times?

    I set up the following cron job and when I checked the connection log, it only polled one time.

    0 52 19 ? * TUE *
    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


    • #3
      The log shows that it is repeatedly downloading each of the files a few hundred times. There are only seven files, they should only be downloaded once.

      Comment


      • #4
        One of the things that I am seeing is that you are not doing anything with the file after it is read. This means that you will continue to try to read the file. If you move the file, it won't be there to be read again.

        Comment


        • #5
          Yea, the requirements are that there is no write permission, which means I can't delete, alter or move the files on the SFTP server

          Comment


          • #6
            OK, I have solved this. I had "Include all subdirectories" checked. I checked it because when it wasn't checked nothing would be downloaded, the source didn't make it clear that the files were being placed in a subdirectory, so once I got that cleared up and reset the channel accordingly without "Include all subdirectories" checked it's behaving as expected.

            I'm a little embarrassed this is all it was, but I figured if it helps anyone else, it worth posting. That said, maybe there needs to be some tweaking on the recursive behavior of the "Include all subdirectories" functionality. Someone may want to use that without benefit of write/move/delete permissions.

            Comment


            • #7
              Youre a good man Jim for posting. We've all done this.
              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