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

Background process for email

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

    Background process for email

    I have an email process that is triggered manually with a button click. I would like to have this process run on it's own once a week at night. Is there a way of running a background process like this through the WEB side? Or should I consider running a runtime version of Alpha on the WAS that does this task?

    Thanks,
    Tom

    #2
    Re: Background process for email

    You can setup an .a5w page that will send the email.
    I use task scheduler to open a webpage like that on schedule.
    Other people like to use cron.
    Gregg
    https://paiza.io is a great site to test and share sql code

    Comment


      #3
      Re: Background process for email

      http://msgboard.alphasoftware.com/al...nders&p=624324

      Comment


        #4
        Re: Background process for email

        Thanks,

        I had searched for background process but didn't find that one.

        Tom

        Comment


          #5
          Re: Background process for email

          Hi All,

          I believe I have a solution to this.

          I have a similar situation where I must send out emails to different groups at different times of the week.
          I am sure there are more sophisticated approaches/solutions but to be honest I am not a programmer by trade and needed to approach this problem with a simple solution that I can on-goingly manage as I need to add more scheduled tasks. I hope this approach can help others too.

          This is a web based solution, I don't know anything about the desktop version of Alpha.
          I am currently using Alpha5V10.5

          There are 3 component needed to this solution.
          1) An Internet Browser
          2) A program called batchrun. This can be found at http://www.downloadcrew.com/article/19531-batchrun or at http://www.outertech.com/en/create-batch-file
          I use batchrun to create simple batch files because it is so easy to use and test my batch files.
          3) Windows task manager, built into windows.

          The concept here is to have windows task manager run a batch file that
          1) Calls up the browser and loads your alpha5 web page that runs the code which sends the email out or does the other process.
          2)Closes the browser window when finished. I usually use time and set the browser to be closed 10 minutes after loading the window.

          It is assumed you already created and tested your alpha5 web page which will get loaded by the browser which runs the code that you wanted automated.
          If you have not created that page yet, go and do so and test it. If needed there are ways to pass parameters to this web page as well if any kind of filtering needs to be done.
          For example: You may have to choose a single group from many and only want to send that group this email at this time. Yet tomorrow you may need to send this email to an entirely different group. So by passing parameters through the web page to process the needed info( to alpha5) you can use just one web page and still take care of many different groups.

          (I am assuming that you will learn how to use batchrun to do the following)
          In the Batchrun program you will need to create 2 batch files.
          The first file is to start the web browser and to load the alpha5 web page. call this run_email.brs or whatever is appropriate for your needs.
          The second file runs about 10 minutes later to close the web browser. call this close_browser.brs or whatever is appropriate for your needs.

          In the windows task manager I setup two tasks.
          The one task (I call it run_email) is setup to run the batch file called run_email.brs on the days of the week and times that you need it to run.

          The other task (I call it close_browser) is setup to run the batch file called close_browser.brs to run 10 minutes after (or what ever time is appropriate) after the first task is run.
          If you do not close the browser window you may run into problems with to many windows opened etc.

          So this is a pretty simple solution pulling together these components to schedule an alpha web based task.

          You can automate a lot of alpha5 tasks this way and keep all the brs batch files in a BRS folder with each batch file appropriately named exactly what it is that it does.

          Hope this is helpful to others. For all of you other folks that have found other ways please by all means share it with the rest of us.
          I am clear one size here does not fit all.
          All the best.
          Calyxte
          Last edited by calyxte; 03-21-2013, 05:52 PM.

          Comment


            #6
            Re: Background process for email

            Hey calyxte,

            I think you've got the right idea, but I think the 'batchrun' program may not entirely be necessary. If you are using a server that includes powershell, you can call up a webpage directly from the command line.

            Steps:
            1) Create an a5w page that does everything that you need it to do using xbasic.
            2) Create a task in the task scheduler that calls powershell and the correct argument.
            Code:
            C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "(new-object system.net.webclient).downloadstring('http://www.example.com/nightly.a5w')"
            and that's it.

            (see this thread for more information: http://msgboard.alphasoftware.com/al...mail-reminders )

            Comment


              #7
              Re: Background process for email

              Hello Sparticuz
              Thanks for sharing how you would/could do it.
              I do know about the powershell and to be honest after looking at it, I just didnt want to spend the time to learn how to do it.
              The batchrun program for me was so simple having never seen it, it only took me 5 minutes if that, from installation to having 2 working batch commands ready to go. The powershell program seemed to me a whole lot more intimidating.

              In the end I think it would be agreeable that programmers should use what they know and what makes sense to them.
              I am sure if I already knew about the powershell program and how to use it, I may have then chosen to already use it to solve this problem.

              One thing I don't know is if the powershell program would already be included on the windows WAS or can it be downloaded to work on the server being used.
              I know the batchrun program is small and will run on all the windows servers if need be.

              No matter how you all decide to do it, in this thread are now 2 examples of how it can be done.
              Hope this helps you all.

              Perhaps in version 12 some kind of scheduling can be included in the WAS to run certain xbasic programs when needed.
              Heck for all I know it's already in there..

              Have a great day!!!
              Calyxte

              Comment


                #8
                Re: Background process for email

                REA Automailer
                http://www.alphadevnet.com/store.a5w...REA_AUTOMAILER

                Allows for queuing of emails to be sent immediately or at a later date.
                Automatic retries on failure, up to 10 retries
                High Level functions for queuing and sending email using SMTP settings
                Send Email method loads SMTP settings from database (SQL/MySQL)
                Send Email method allows for manual SMTP settings (instead of loading from database, you can provide your SMTP settings)
                Comes with Thorough Documentation


                Hope it helps!
                Scott Moniz - Computer Programmer/Analyst
                REA Inc.
                http://reainc.net
                (416)-533-3777
                [email protected]

                REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                contact us to discuss options.

                Comment

                Working...
                X