Search code examples
genexus

Background process/task in genexus?


We're using Genexus EV3 to develop a project and we noticed that we can use it to easily alert users through SMS or emails about relevant information.

I'd like to know if it's possible to create some sort of background process in genexus that checks a database and so that we can send emails based on the information present in the database. Thanks.


Solution

  • You can make a asynchronous call to a procedure object using the submit method, like:

    // Some code...
    prAnyProcedure.submit(&parm1, &parm2)
    // Some code...
    // Some code...
    

    In this case, the main program flow will continue processing immediately.

    But if you need to call a procedure from time to time without any user intervention, you should use a server-side tool like ant or the cron/crontab linux utility.

    http://ant.apache.org/faq.html#what-is-ant

    http://linux.die.net/man/8/cron