Announcement

Collapse
No announcement yet.

Run Shell Script after FileReader

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

  • Run Shell Script after FileReader

    Is there a way I can run a shell script after I do a file read? Perhaps in a postprocessor script?

    The shell is sudo DeleteIt.sh

  • #2
    Check out Utility Function "Call System Function" under References. You should be able to run your script using that command as long as the user running mirth connect has permission to run that shell script.

    Comment


    • #3
      Thank you for this info. I actually figured out a way around it:

      Created a FileReader - SFTP for the directory I am watching for log files. Once a file is dropped, I have a destination to no where (Channel Writer). I have a postprocessor job that then kicks off a batch file. Inside the batch file is a plink command that executes my shell script.

      Code:
      Runtime.getRuntime().exec("cmd /c start D:\\TEST\\get.bat");
      return;

      Comment


      • #4
        This might help: http://www.mirthcorp.com/community/f...7649#post47649
        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

        Working...
        X