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

Scheduled Download

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

    Scheduled Download

    How do I go about creating a scheduled download of data from the web. There is data on the server that needs to be downloaded every night about 1 AM. The person in charge of this has made this request as he may FORGET to do the download on his own. I know the code for transfering the files, not the timer/scheduling portion.

    Thanks

    #2
    Re: Scheduled Download

    I called Phil and described a method, and think I will lay it out here also.

    To schedule anything in the WAS, you need a 3rd party scheduler and an A5W page with xbasic code. I have done all of this in the iTaskMan application that you see in the link below my signature. It end up not being a viable product though, because it schedules YOUR events from MY server. Technically that works perfectly, but who wants an outside entity to be running processes on your server? At least that is what I have found from discussions with prospective buyers. So I am in the process of revamping it to be an install on your local server. (Any takers?)

    But the process you would create would be the same as I implemented in iTaskMan. Here are two methods, although without much detail and likely too sketchy to follow:

    1) FolderWatch

    Some action within your application causes a file to be created in a particular folder watched by a FolderWatch program. The action could be the user clicking a button or running a script. So this is not really 'scheduled' as much as user-initiated, then delayed processing. The file contains information necessary to run the process. FolderWatch then executes CURL.EXE which uses the contents of the text file in an HTTP POST action to an A5W page that runs the desired process.

    Most recently I am using the above process to take some processing offline so the user will not have to wait after pressing the Submit button. The processing takes too long from the users perspective, so this method has the process take place "some time later" and not inconvenience the user or potentially bog down the server.

    2) CRON

    CRON or CRONTAB is a widely used scheduling utility. You can schedule actions to take place up to one minute apart. Or you can schedule something to take place every Sunday at Noon for instance. You can use CRON to again schedule CURL.EXE to send an HTTP POST to an A5W page and initiate an action. If you look for this file, be sure it is for Win, not Unix.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Scheduled Download

      Here's another option, a program called Macro Scheduler:

      http://www.mjtnet.com/macro-schedule...n-software.htm

      It may seem like overkill for one particular use, but if you spend time with the program you'll find lots of other uses for it in your daily work. (No, I'm not affiliated with them, just like the program.)

      Comment


        #4
        Re: Scheduled Download

        Originally posted by Phil Rolf View Post
        How do I go about creating a scheduled download of data from the web. There is data on the server that needs to be downloaded every night about 1 AM. The person in charge of this has made this request as he may FORGET to do the download on his own. I know the code for transfering the files, not the timer/scheduling portion.

        Thanks
        Maybe I'm missing something here. Why not schedule an FTP session?
        Tommy Thompson
        Thompson Consulting Services
        Beautiful Kentucky Lake, Springville, TN 38256
        [email protected]

        Comment


          #5
          Re: Scheduled Download

          For the specific question of downloading data, yeah FTP would work, but I think Steve's solution would be more for doing some other type of processing like posting records or running calcs or whatever couldn't be handled by simple file transfer.

          Comment


            #6
            Re: Scheduled Download

            How about automating scripts? I think I read all posts regarding this but could not find a real clear answer. I've mentioned CRON in a past post and so have others. I believe CRON is the answer but am confused as to which one to install on my Win 2003 sever.

            Here is a link to CRON http://www.kalab.com/freeware/cron/cron.htm
            but pycron is supposedly a more recent development. http://www.kalab.com/freeware/pycron/pycron.htm

            Another option? http://www.autoitscript.com/autoit3/

            I've tried Windows Task Manager but it doesn't seem to like .a5w pages.

            I have 3 scripts I need to run. Daily.a5w every day at 2AM, Week.a5w every Sunday at 2:30 AM, and Month.a5w 2nd day of the month at 3AM.

            What do you use?

            Thanks
            Last edited by EricN; 09-01-2008, 11:02 PM.
            Eric

            Alpha Five Websites
            longlivepuppies.com
            socialservicenetwork.com
            -------------------------------------------------
            socialservicenetwork.org

            Comment


              #7
              Re: Scheduled Download

              If you use CRON:

              1. Create an A5W page with code that runs your task if you were to fire the page in a browser.

              2. Add some password protection to your code so it doesn't accidently get fired when the page is opened in a browser, like:

              if eval_valid("pwd")
              if pwd = "oktogo"
              ....your script
              end if
              end if

              3. Get CURL.EXE, figure out how to write a simple one line CURL command to execute your A5W page along with the password parameter described above.

              4. Get CRON (the one I have is actually called CRONTAB, not CRON) and figure out how to schedule the CURL command above.

              I remember trying out the pycron and tossing it out as too much work compared to simple CRON.

              Or, if you want, review my "iTaskMan" product at this page http://www.itaskman.com/howitworks.a5w.

              I will gladly rework that system from a it's configuration as a subscription service to something you can install on your own computer. It is a complete task and reports scheduler for Alpha web apps, with a bunch of useful features built in.
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Scheduled Download

                Hello Steve,
                Do you know which version of CURL? There are several options.
                http://curl.haxx.se/download.html
                Also SSL enabled or disabled?

                Where does one get Crontab?
                I'm looking at this: http://www.nncron.ru/

                Thanks
                Last edited by EricN; 09-02-2008, 01:09 AM.
                Eric

                Alpha Five Websites
                longlivepuppies.com
                socialservicenetwork.com
                -------------------------------------------------
                socialservicenetwork.org

                Comment


                  #9
                  Re: Scheduled Download

                  That's the one I have. Don't think you need the SSL to run CURL on ssl websites, but I've never tried.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: Scheduled Download

                    WIN 32 Generic? Not sure which to download...

                    I don't see Win2003 Server listed but I think it might be this one
                    http://curl.haxx.se/latest.cgi?curl=win32-nossl-sspi
                    Eric

                    Alpha Five Websites
                    longlivepuppies.com
                    socialservicenetwork.com
                    -------------------------------------------------
                    socialservicenetwork.org

                    Comment


                      #11
                      Re: Scheduled Download

                      I see its on my website for download under Developer Resources. I tend to do this, so you (anyone) might look there before searching the web for some utility I recommend.

                      The CRON is called CronTab on my site. CURL is there too. In fact, all or most of the utilities I find useful are on the Developer Resources page, under Essential Tools.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Scheduled Download

                        I've downloaded cULR on my personal computer and unzipped it. When I click cURL.exe, I get a black rectangle that is displayed for a split second then vanishes.

                        I understand most of the command lines but am not able to get into the cULR itself to put them in...
                        I guess I'm doing something wrong??

                        Can you give a sample of what a "simple one line CURL command to execute your A5W page" is?

                        Thanks
                        Last edited by EricN; 09-02-2008, 07:44 PM.
                        Eric

                        Alpha Five Websites
                        longlivepuppies.com
                        socialservicenetwork.com
                        -------------------------------------------------
                        socialservicenetwork.org

                        Comment


                          #13
                          Re: Scheduled Download

                          curl.exe -d "name=steve" http://www.alphatogohost.com/process1.a5w

                          If you are going to test it, open a command box first. ("CMD" from Start > Run).
                          Steve Wood
                          See my profile on IADN

                          Comment


                            #14
                            Re: Scheduled Download

                            Please see my failed strings. Also tried "name=Eric"

                            Do I need to have a domain name or is the IP good enough?

                            Thanks
                            Eric

                            Alpha Five Websites
                            longlivepuppies.com
                            socialservicenetwork.com
                            -------------------------------------------------
                            socialservicenetwork.org

                            Comment


                              #15
                              Re: Scheduled Download

                              I doubt that your URL should include the A5Webroot since that is the root directory itself.

                              But because I have a nifty product that does all of this, I can't continue on this thread.
                              Steve Wood
                              See my profile on IADN

                              Comment

                              Working...
                              X