web stats
CRON-enabled reader channel runs continuously for 20 minutes - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2020, 09:51 AM
wheresjim wheresjim is offline
Mirth Newb
 
Join Date: Mar 2012
Posts: 16
wheresjim is on a distinguished road
Default 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
File Type: xml SFTP_READER.xml (12.2 KB, 2 views)
Reply With Quote
  #2  
Old 01-08-2020, 09:05 AM
kirbykn2's Avatar
kirbykn2 kirbykn2 is offline
Mirth Guru
 
Join Date: Sep 2014
Location: Michigan
Posts: 608
kirbykn2 is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 01-13-2020, 08:46 AM
wheresjim wheresjim is offline
Mirth Newb
 
Join Date: Mar 2012
Posts: 16
wheresjim is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 01-13-2020, 08:59 AM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,348
cory_cole is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 01-14-2020, 02:38 PM
wheresjim wheresjim is offline
Mirth Newb
 
Join Date: Mar 2012
Posts: 16
wheresjim is on a distinguished road
Default

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
Reply With Quote
  #6  
Old 02-04-2020, 10:48 AM
wheresjim wheresjim is offline
Mirth Newb
 
Join Date: Mar 2012
Posts: 16
wheresjim is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 02-04-2020, 11:04 AM
kirbykn2's Avatar
kirbykn2 kirbykn2 is offline
Mirth Guru
 
Join Date: Sep 2014
Location: Michigan
Posts: 608
kirbykn2 is on a distinguished road
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation