REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    How to force DbDrv to write the data every 5 minutes (xx:00,xx:05,xx:10, ...)?

    Database (MySQL, MariaDB, PostgreSQL, MSSQL)
    3
    6
    2.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      contactform
      last edited by

      Hi,
      I have our controllers writing values every 5 minutes to a database server. It starts pushing 5 minutes from upload to target. Would it be possible to have it to do it on the minute every 5 minutes(5:00,5:05,5:10)? This makes it easier for analytics.

      Regards,
      George

      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by cechurat

        Hi George,

        thank you for interesting question. In REXYGEN it is possible to force write to database whenever you want to - it is done by additional auxiliary flag "Trigger". See screenshot which shows additional logic in order to generate pulse every 5 minutes aligned with local time.

        0_1559047869736_DB_trigger.PNG

        Source file download: DB_trigger.mdl

        More information on auxiliary flags - see DbDrv docs: https://www.rexygen.com/doc/ENGLISH/MANUALS/DbDrv/DbDrv_ENG.html#x1-200003.2

        Hope it helps.

        Regards, Tomas

        P 1 Reply Last reply Reply Quote 0
        • P
          PetrCH @cechurat
          last edited by

          @cechurat Dear Tomas, I followed your steps but was unable to trigger the write to the SQL. 0_1560857965023_db-trigger.png

          Could you please help me how to use the _Trigger flag properly?
          (writing to the DB using an interval works O.K.)
          Thanks in advance,
          Petr

          1 Reply Last reply Reply Quote 0
          • cechuratC
            cechurat
            last edited by

            Hi Petr,

            thank you for your comment. According to the screenshot provided you are using Groups which is a bit different. The thing is that auxiliary flags are defined for Items not Groups. Therefore try to change your GoTo flag "DB__writeGroup1_Trigger" to "DB__writeGroup1_line_no_Trigger" (or any other Item name within the Group followed by "_Trigger" suffix) - it should do the job.

            Let me know if it solved the issue.

            Cheers, Tomas

            P 1 Reply Last reply Reply Quote 0
            • P
              PetrCH @cechurat
              last edited by

              @cechurat Tomas, thanks a lot, works now!

              cechuratC 1 Reply Last reply Reply Quote 0
              • cechuratC
                cechurat @PetrCH
                last edited by

                @petrch Glad I could help 😉
                Our developers already implemented the new functionality. Starting from new REXYGEN release it will behave as you expected - that Group itself will have also _Trigger flag.

                Good luck with your project.

                Regards, Tomas

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

                There is also an outdated REXYGEN community forum.

                Powered by NodeBB.