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

How to run a script every day at the same time

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

    #16
    Re: How to run a script every day at the same time

    Thanks Tom,

    That must be the problem. Question?

    If I want it run run once every day do I calculate the total number od=f seconds in a day and put that number into the timer field/

    Comment


      #17
      Re: How to run a script every day at the same time

      Why not use windows task scheduler and base the run on an Alpha shortcut that runs a specific script/function once a day?

      Then it will run whether Alpha is running or not...

      Is the mainmenu left running so this timer event can happen at the proper time? What do you do if Alpha isn't running?
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      http://www.iadn.com/images/media/iadn_member.png

      Comment


        #18
        Re: How to run a script every day at the same time

        You want the timer interval to be one hour.

        When the timer event fires the script

        Code:
        if time("h") = "6"
        script_play("PmixD")
        end if
        only executes if the current time is between 6:00:00 am and 6:59:59 am. That only happens once a day. So the PmixD script will only run once a day.

        Think of waking, at least partially, every hour through the night and looking at your alarm clock. You have an internal script that calls for you to get up if the time is between 6 and 6:59 am. You only execute the get up script if that's the time you see. Otherwise you go back to sleep.
        Last edited by Stan Mathews; 07-31-2009, 12:07 PM.
        There can be only one.

        Comment


          #19
          Re: How to run a script every day at the same time

          Thank you all!

          Al, I would really like to know how to set up the Alpha side and use windows task scheduler.

          Back in the day I flew Balckbirds in the Air Force and the plane was a bit faster than my brain. Now days at 59 even the computer and Alpha are way faster than my brain.

          Stan, I think that the information Stan and tom gave has helped me a lot and I wold love to know themethod the method Al was talking about. That would eliminate failure when the user closed the program.

          Comment


            #20
            Re: How to run a script every day at the same time

            Originally posted by Windstarsoftware View Post
            Thanks Tom,

            That must be the problem. Question?

            If I want it run run once every day do I calculate the total number od=f seconds in a day and put that number into the timer field/
            Fred, you're welcome. I'll respond further after you do a bit of testing and work through the example I outlined for you.

            Comment


              #21
              Ureka! It Works

              Thanks again to all for your for your great advice and patience. The sbript executes as needed. Its great to be part of the Alpha family. There is no better support than the users group for Alpha5. Thats why so many of us have stayed with it for so long.

              Comment


                #22
                Re: How to run a script every day at the same time

                I am a little troubled with the approach, but do not know exactly what you are trying to achieve. What happens if PC is not rurned on until 7:05am? The script does not run that day! I doubt whether this is ok.
                I wanted to do a similar thing and set up two fields in a one record Parameters table for DateLastRun and ScriptStartTime.
                The OnTimer event in the form then checks more frequently and in pseudo code:

                if (date()>DateLastRun) and (time()>ScriptStartTime) then
                run script
                modify date in Parameters table to date()
                end

                This approach also has the advantage that the script will run at more or less the same time every day and if business rules require a new ScriptStartTime it is a change of a field rather than hard coded.

                Comment


                  #23
                  Re: How to run a script every day at the same time

                  Garry,

                  A valuable addition to the discourse. My answer was predicated on

                  I want to schedule a script to run at the same time everyday of the week year round.
                  If the machine wasn't constantly on or on at the desired time, the question would have been pointless.
                  There can be only one.

                  Comment


                    #24
                    Re: How to run a script every day at the same time

                    Stan,
                    I know that you and Tom helped solve the question asked and I was in no way detracting from that with my earlier post. However, my work with clients often reveals that what they think they need is not what they actually need and I guess I wanted Windstarsoftware to think carefully about whether his approach is best.
                    Even with a PC that is always on, the power goes off occasionally, so always is hard to guarantee.

                    Comment


                      #25
                      Re: How to run a script every day at the same time

                      As I said, yours was/is a valuable addition to the topic. Glad you helped.
                      There can be only one.

                      Comment


                        #26
                        Re: How to run a script every day at the same time

                        Originally posted by Windstarsoftware View Post
                        Thank you all!

                        Al, I would really like to know how to set up the Alpha side and use windows task scheduler.

                        Back in the day I flew Blackbirds in the Air Force and the plane was a bit faster than my brain. Now days at 59 even the computer and Alpha are way faster than my brain.

                        Stan, I think that the information Stan and tom gave has helped me a lot and I wold love to know the method the method Al was talking about. That would eliminate failure when the user closed the program.
                        Fred, so you flew Blackbirds... Outstanding. I've seen a few of them, but I'd certainly loved to have flown one.. Of course there are a lot of planes that I'd love to fly but with corrected vision, not too many that I could.

                        I toured an Airbus 380 at the EAA last week. What a monsterous size. Cracked my head crawling through a Lancaster. Just a little difference in size.

                        As far as the window's task scheduler... here are a couple of posts that are relevant.
                        http://msgboard.alphasoftware.com/al...9&postcount=17

                        http://msgboard.alphasoftware.com/al...9&postcount=18

                        I also suggest that you build an auditing/logging process (also suggested by Garry) to track when the schedule ran and perhaps what the results were.. It's very handy when verifying who/what/why/when/how...
                        Al Buchholz
                        Bookwood Systems, LTD
                        Weekly QReportBuilder Webinars Thursday 1 pm CST

                        Occam's Razor - KISS
                        Normalize till it hurts - De-normalize till it works.
                        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                        When we triage a problem it is much easier to read sample systems than to read a mind.
                        "Make it as simple as possible, but not simpler."
                        Albert Einstein

                        http://www.iadn.com/images/media/iadn_member.png

                        Comment


                          #27
                          Re: How to run a script every day at the same time

                          Hi Al,

                          I have not been to the EAA show in years but I know you had a good time. Now days my flight time is spent in a Piper CHerokee six 300 that I fly part time for a small company. One of the Blackbirds that I flew years ago is on display in Charleston SC. All but a few are now sitting on display in museums around the country. Really a great plane to fly and NASA is still using one for research.

                          You mentioned earlier that you knew how to set up Alpha to run as a service where it could perform the script even if Alpha was closed. Could you tell me more on that?

                          Fred

                          Comment


                            #28
                            Re: How to run a script every day at the same time

                            Originally posted by Windstarsoftware View Post
                            You mentioned earlier that you knew how to set up Alpha to run as a service where it could perform the script even if Alpha was closed. Could you tell me more on that?

                            Fred
                            See post 26 - not a service but use windows task scheduler to start Alpha at a predetermined time and run a specific script.

                            In post 26, there are links to 2 other posts that explain the process.

                            I learned in Cessnas, mostly a 172, but liked to fly a Piper Arrow, Mooney 201 or 231.

                            Was going into the Navy, but by 1974 the demand went down and so did my aviation career.

                            No time for it now. logmein and gotomeeting are much faster.
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.
                            "Make it as simple as possible, but not simpler."
                            Albert Einstein

                            http://www.iadn.com/images/media/iadn_member.png

                            Comment

                            Working...
                            X