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

daily routine

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

    daily routine

    Dear alpha-experts!

    I'm building web application using a5v9. In the application I have to run daily routines automatically (for example, check how far from now is user expiration date and in case it is too close send a notification message to relevant users).

    I guess a lot of people here implemented functionality like this before, can you please give me a clue which approach do I better use to do it? May be A5 already has some build-in functionality for daily routines implementation?

    Thank you in advance,
    Olga

    #2
    Re: daily routine

    You could use something like WinCron to run daily jobs that call a maintenance app in Alpha5, alternatively I believe some people have implemented something that is triggered upon user login. This adds a record or an entry somewhere upon completion of a process, so only the first user logging in on any given day will trigger the process.

    Comment


      #3
      Re: daily routine

      Andrea, thank you for your reply!

      Can you please tell me little bit more about WinCron? It is not a part of A5 as I understand... Can it be somehow integratedwith A5? For example if I can trigger a5 xbasic script using WinCon?

      Attaching trigger to the first user login is easy to build, but it has its disadvantages... For example, if this dily routine has to process several tables with a lot of rows inside it can take sugnificant time and this first user will not be able to open his pages...

      Thanks a lot,
      Olga

      Comment


        #4
        Re: daily routine

        Originally posted by moiola View Post
        Andrea, thank you for your reply!

        Can you please tell me little bit more about WinCron? It is not a part of A5 as I understand... Can it be somehow integratedwith A5? For example if I can trigger a5 xbasic script using WinCon?
        It is a tool that allows you to trigger scripts and exes on a set schedule - Since you posted in the app server section, you could put your Xbasic script into an a5 page that is only accessible from localhost (e.g. from the web server so nobody outside can hack into it), then on schedule call the page in question using the free cURL command line tool & passing in any parameters you like.

        http://curl.haxx.se/

        Comment


          #5
          Re: daily routine

          Seems that WinCron/(some other external application) is the only solution... Andrea, thank you very much!

          However, I'm very interested in A5 build-in capabilities of solving problems like this, may be there is something? For exmaple for A5 Desktop applications there is SCRIPT_SCHEDULE() function that can schedule a script to run each day or each week. Can I build A5 desktop application that will address my A5 Web application tables and run in background mode? Or A5 desktop applications are not designed to be running in a background?

          Any help is appreciated...
          Olga

          Comment


            #6
            Re: daily routine

            Originally posted by moiola View Post
            Seems that WinCron/(some other external application) is the only solution... Andrea, thank you very much!

            However, I'm very interested in A5 build-in capabilities of solving problems like this, may be there is something? For exmaple for A5 Desktop applications there is SCRIPT_SCHEDULE() function that can schedule a script to run each day or each week. Can I build A5 desktop application that will address my A5 Web application tables and run in background mode? Or A5 desktop applications are not designed to be running in a background?

            Any help is appreciated...
            Olga
            That would have been my next suggestion, e.g. use the dev copy or a single user RT to run as a monitoring app on the server... We have several functions like that in a minimal GUI monitoring app that runs on a server, the GUI is still useful to give a quick overview over what is currently being processed.

            (You can always skip the GUI though and use the relevant startup commands to hide the main window etc.)

            Comment


              #7
              Re: daily routine

              Complete solution - www.itaskman.com
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: daily routine

                Steve, thank you for the link!

                Unfortunately I didn't manage to sign-up on itaskman.com since there are some a5w errors there... May be there is some other place where I can read more about this solution?

                Thanks,
                Olga

                Comment


                  #9
                  Re: daily routine

                  I kinda abandoned running it as a subscription service, the Alpha arena is not large enough to get enough customers to make it worth administering as a service. That plus being a service means it has to have public access to the A5W page on YOUR website that will launch the process. Even though that is password controlled, it unnerves people to think about it.

                  But as a concept application, it is a great example of how to automate actions. It can run multiple reports whenever you want, each with a different filter and order and then emailed anywhere. It can run some maintenance every day at 10AM or every third Monday or if a database value hits some threshold.

                  It's 99% Alpha, plus a timer utility plus cURL that was mentioned below. Belive it or not, I built it as an tangent while learning how to use HTTP_POST.

                  Email me and I'll set up a time to show it to you. Maybe we can carve out the relevant parts to embed it in your application.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: daily routine

                    Hi Steve,
                    Does this offer still stand (and..er..does it stand for me..since it wasn't necessarily made to everyone)? I don't know 100% if I need it...I just want to be able to push a button on my webapp and send a message of the "Hello [USERNAME].." sort to everyone in the database. Is there something simpler such that I wouldn't need your scheduler?

                    I know how to have an email sent when a record is submitted/updated/validated, but how do I send an email to everyone? I'm imagining something like a button that I press or a menu item that I select and everyone gets a personalized email. Do I need your scheduler, or is this easy in A5?

                    If it were a desktop app, I'd be thinking of attaching some xbasic to a button object, but on webapps...I don't know how to begin thinking about this.

                    fyi...I'm using version 8 with was, latest patch, with grid-based web forms.

                    Comment


                      #11
                      Re: daily routine

                      for example...this is how you do it if you have a desktop app (although in my case the from, body, and subject of the email are static except for the name field, so I'd probably hardcode that as a default). Michael Wilson uploaded this on another post, but I can't find it so I'll just reupload the file here.

                      So...how do I do this on a webform (note: Michael's example is more interactive than I need..just a button that send the same "hello [username]..." email to everyone would be great).

                      thanks and I'm still down here in Santa Cruz...we never did that bay area A5 meeting, but I'm still up for it.

                      Comment


                        #12
                        Re: daily routine

                        If you want to "press a button", then you don't need to schedule anything. You would write almost the same xbasic you would for a desktop application. Create a dialog and put the code in the after validate event. I would use the function table.external_record_content_get() to get a crlf delimited list of all the emails/names you wanted. Then use the for...each function to loop through each "record" in your list, sending an email to each using email_send2() function. Easy to say (actually not easy to say), but see if that gets things going.
                        Steve Wood
                        See my profile on IADN

                        Comment


                          #13
                          Re: daily routine

                          Thanks, I'll do that.
                          d.e.

                          Comment


                            #14
                            Re: daily routine

                            Also, if you ever get up North to the East Bay area, give me a call and drop by.
                            Steve Wood
                            See my profile on IADN

                            Comment


                              #15
                              Re: daily routine

                              Hi Steve [Again]

                              Very interisting indeed.

                              I believe i have similar requirements.

                              I use "function AfterInsertRecord as v (e as p), email_smtp_open(ps, "mail.msuk.gov.za")" to forward mail notifications to specific users if and when a new record are created/updated/deleted etc.

                              The next step is to monitor a "due date" field and forward a notification message to specific users 30days [prior to due date], 15 days [prior] and on due date.

                              If at all possible [very likely], could your code provide me with a solution to this?

                              Comment

                              Working...
                              X