Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   CRON-enabled reader channel runs continuously for 20 minutes (http://www.mirthcorp.com/community/forums/showthread.php?t=222210)

wheresjim 01-07-2020 08:51 AM

CRON-enabled reader channel runs continuously for 20 minutes
 
1 Attachment(s)
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.

kirbykn2 01-08-2020 08:05 AM

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 *

wheresjim 01-13-2020 07:46 AM

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.

cory_cole 01-13-2020 07:59 AM

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.

wheresjim 01-14-2020 01:38 PM

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

wheresjim 02-04-2020 09:48 AM

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.

kirbykn2 02-04-2020 10:04 AM

Youre a good man Jim for posting. We've all done this. :)


All times are GMT -8. The time now is 04:57 AM.

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