Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Automated Runtime Process - Problems

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

    Automated Runtime Process - Problems

    Alpha version 7086 with SQL database.

    I use Alpha's runtime to run scripts that handle various tasks for my web app (data processing, sending emails, sending sms, etc). I'm using Windows Task Scheduler to run a BAT file that then runs the script.

    BAT file example: "C:\Program Files (x86)\a5V12 Runtime\alpha5.exe" "C:\Alpha_Development\Process_Server_Runtime\Process_Server_Runtime.adb" -executeandexit -command=script_play("Email_Handler")

    Most of the time this all works well. However, several times each day I get this xbasic error: Error converting named connection to connection string

    Also, I've noticed extra runtime processes hanging around in the Task Manager.

    Ashampoo_Snap_Saturday, February 13, 2021_12h44m56s_001_.png
    I'm unsure how to approach these issues. I see a A5.close() method in the documentation. I don't use this in my scripts but maybe I should? My bat files use the -executeandexit parameter but it seems sometimes this fails or something is preventing the script from exiting.

    I'd appreciate any advice/suggestions someone might have.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant​​

    #2
    Hi Mike,

    I do the same basic thing except I skip the batch file and use the oninit and ontimer events of a simple default page.
    It works great until the end users introduce bad data. I've got most of that eliminated now but just in case, I have
    a runtime app on a separate computer checking to confirm the process was completed within the expected time,
    and if not, it sends me an email/text.
    Gregg
    https://paiza.io is a great site to test and share sql code

    Comment


      #3
      I'm a long time web app developer in Alpha but the desktop side of things is like a foreign language to me (except for the xbasic part). I don't suppose you have a sample page with such a timer do you?

      I reached out to another developer that said he does the same thing or something simliar: "I have a desktop form that loads on start. I turned the timer event on that and have the timer event call the necessary processing function."
      Mike Brown - Contact Me
      Programmatic Technologies, LLC
      Programmatic-Technologies.com
      Independent Developer & Consultant​​

      Comment


        #4
        Setup a dbf table with one field (I call mine cheat).
        Create a form for this table.
        Right-click on the form while in design mode, this is where you'll see the events and properties.
        Put the desired script/functions on the appropriate events.
        Set the timer interval in the properties section.
        Gregg
        https://paiza.io is a great site to test and share sql code

        Comment


          #5
          Great, thanks!
          Mike Brown - Contact Me
          Programmatic Technologies, LLC
          Programmatic-Technologies.com
          Independent Developer & Consultant​​

          Comment


            #6
            Be sure to let us know how it works. Mine is a beast. It gets data from 2 legacy order systems , then after it processes the orders it
            sends status updates to customers as well as sends orders via email/sms to our drivers.
            It also notifies dispatchers of drivers that have been on the road for too long and a few other tasks.
            The bad news is that to paraphrase the old horse to water saying, We can bring the water to the horse,
            but we still sometimes have to force it down the horse's throat.
            Gregg
            https://paiza.io is a great site to test and share sql code

            Comment


              #7
              So this ended up being really start forward. Thanks again for the help.

              The last piece of this puzzle, for me anyways, is how do I now get this form to run automatically? I mean, I can run it in the IDE but how can I now have this form run outside of the IDE?
              Mike Brown - Contact Me
              Programmatic Technologies, LLC
              Programmatic-Technologies.com
              Independent Developer & Consultant​​

              Comment


                #8
                Using the desktop workspace control panel, choose Workspace Properties from the File menu,
                You'll see the option for the startup form, and even a few other options that might interest you.
                Capture.PNG
                Gregg
                https://paiza.io is a great site to test and share sql code

                Comment


                  #9
                  I'm tagging on to this thread rather than start a new one because it seems I'm trying to do exactly what mikeallenbrown is actually doing.

                  I have two Desktop apps installed on a web server that are designed to gather data from SQL tables and send notifications (via JSON) to various endpoints. The way each is set up is exactly as in the previous post: A form is opened on startup and a piece of code is attached to the Timer event on the form (every 15 minutes). When they run they run well. Note this is on Runtime PLUS 12.4.6.2.3, Build 6985. I have the same Runtime launching both apps via something called "Always Up" installed on the server. The server is restarted each night.

                  The problem is that after about four or five days (varies), both apps will start up at midnight (when the server is restarted), run for a few timer cycles then stop. I have to go in each day to insure they're running and if not then do a restart. I'm not sure if it's Always Up, something in my code, the Runtime version or if I'm just not supposed to run two different apps with one Runtime.

                  I am a web developer so I'm not familiar with the ins and outs of Desktop (don't have a base of experience) so I'm posting here to elicit opinions, thank you in advance for any help.


                  Norman

                  Comment


                    #10
                    Hi Norman,

                    Maybe something funky happened near the end of the summer. My system started failing during the day. Investigation determined it
                    was something with dns. My solution was to restart the dns client at the beginning and end of each cycle.
                    I also have a desktop app on a separate pc that let's me know if it's been more than 5 minutes since the process last started.

                    It took me a bit to get all the logging setup, but it has made troubleshooting so much easier.
                    I don't bother with always up, but I absolutely have the server reboot at 02:20. I have the app stop
                    processing from 02:15 to 02:35.

                    It's difficult to figure out without doing some detective work.
                    Gregg
                    https://paiza.io is a great site to test and share sql code

                    Comment


                      #11
                      Well, yes, I of course realized I'd have to start logging at various stages of the processes. I've found that when the process fails it does so before any real work is done. That is, I have the process set so it doesn't do anything (and EXITS the script) until 5:00AM, but does write a log message before the EXIT. When the process does stop running (fails) my logs show the last message is at about 2:00AM (so, say, after about 8 cycles). So, again, it's failing before actually doing anything. Before upgrading the Runtime version I think I'm going to take one of the two processes out of Always Up and start it manually to see if for some reason the two are conflicting with each other.

                      Thanks for your thoughts.

                      Comment


                        #12
                        It's amazing...all the work I put into creating that logging process, and once I got the problems fixed,
                        I promptly forgot where I put them. Give me a chance to look for something else to get to the point
                        where I can remember where I buried the logging project.
                        Gregg
                        https://paiza.io is a great site to test and share sql code

                        Comment

                        Working...
                        X