NextGen (Mirth) Connect 3.11.0 Released!

NextGen (Mirth) Connect 3.11.0 is now available as an appliance update and on our GitHub page. This release contains improvements to licensing and the NCPDP data type. It also includes various security fixes, general bug fixes, and improvements to commercial extensions. See the release notes for the complete list of fixes and improvements.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Problem with Mirth, postgres, and scheduled tasks

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Mirth, postgres, and scheduled tasks

    Has anyone used the Mirth database reader to execute system level tasks? We use a postgres 11 database and because we don't use 13, we can't use pg_cron. I'm trying to write a channel that will be executed once per day that will kick off "reindex database ourDB"

    The javascript in the DB reader I am trying to execute is:

    var dbConn;

    try {
    dbConn = DatabaseConnectionFactory.createDatabaseConnection ('org.postgresql.Driver','jdbc:postgresql://','user','password');
    var result = dbConn.executeCachedQuery("reindex database ourDB");
    // You may access this result below with $('column_name')
    return result;
    } finally {
    if (dbConn) {
    Unfortunately, this isn't working. I know from choosing the SELECT that my connection string does work as it returns tables that are available to me. POSSIBLY related is that none of those tables have a schema with them (we don't use the default dbo schema). I know this isn't the intended function of Mirth...I'm just trying to work around the limitations our solution gives us.

  • #2
    You can’t use
    Diridium Technologies, Inc.


    • #3
      Thanks pacmano. Unfortunately, it isn't a supported extension.


      • #4
        Well since it is managed service, why aren’t they doing that tuning for you?

        You can of course use mirth or even old school cron to do db maintenance tasks.

        I would be concerned about jdbc timeouts for long run for tasks and thereby use normal cron.

        if using mirth I would typically use a JavaScript reader that has “return true” in it and do the task in a JavaScript writer destination.
        Diridium Technologies, Inc.