15 Replies Latest reply on Dec 14, 2010 9:12 AM by larkinh5

    coldfusion scheduling task using wget

    larkinh5

      not quite sure how to accomplish this for the wget.

       

      I have a event I need to schedule to run every hour.  I am using window hosting.

       

      I have learned that I can't use the path to event.cfm within the path to executable file (naturally it needs to be and .exe)

       

      So I downloaded wget 1.11.4 and uploaded the wget.exe to within the event directory. (only the wget.exe file)

       

      C:\*******\event5\wget.exe  <-- this is in the

       

      wget http://*****/event5/event.cfm  <-- this is in the argument

       

      (sensitive hosting information taken out naturally)

       

       

      within the event.cfm page I have the following code

       

      <!-- include count auctions routine -->

      <cfinclude template="count_auctions/index.cfm">

       

      What this event is suppose to do is count the auctions.

       

       

      Now when I run the event I get an email, but it doesn't "run" the event.

       

      Am I doing this correct?

      Is there another way I can execute or run a .cfm page?

       

      I tried different things and nothing works.

        • 2. Re: coldfusion scheduling task using wget
          larkinh5 Level 1

          This is a program that was purchased and they want me to use the scheduling task within the server/hosting company instead of it being built in.

           

          I'm going by what the setup.txt file states, but I can't exacute a .cfm file directly as the setup.txt file states.

           

          It's a pretty complex program and I'm trying not to work with it instead of changing it.

           

          If there's a way I can build a scheduler event then I will, but trying to see if this will work.

           

          I don't actually have coldfusion....I just purchased a program that was built in coldfusion.

           

          Message was edited by: larkinh5

          • 3. Re: coldfusion scheduling task using wget
            ilssac Level 5

            larkinh5 wrote:


            I don't actually have coldfusion....I just purchased a program that was built in coldfusion.

             

            You may need to expand on this statement.  ColdFusion applications do not work unless you HAVE ColdFusion.  (They are not like desktop applications that are complied into executable files.)

             

            Did you buy a CF program to run on some hosting provider that is providing ColdFusion hosting for you?

            • 4. Re: coldfusion scheduling task using wget
              ilssac Level 5

              larkinh5 wrote:

               

              wget http://*****/event5/event.cfm  <-- this is in the argument

               

               

              In light of your subsequent post, we should confirm that what ever server http://*****/ is connecting to has ColdFusion installed on it?  If it does not, then requesting CFML files (i.e. event.cfm) is not going to produce any results.

              • 5. Re: coldfusion scheduling task using wget
                larkinh5 Level 1

                i started looking at the links you sent me and I was putting the task in a scheduler, but not a coldfusion scheduler.  I have actually contacted the server to see if they have a coldfusion administrator within it.  I did talk to them a while back and they said that they can run coldfusion and have a coldfusion dsn, but am learning very quickly about the differences.

                 

                You have pointed me in the right direction. I'll let you know what happens..like I said i'm waiting on them to email me back.

                thanks

                -h

                • 6. Re: coldfusion scheduling task using wget
                  ilssac Level 5

                  You can quickly test the server.

                   

                  Put your wget parameter {http://*****/event5/event.cfm} into a browser.  Do you get the expected results?  Or do you get a code file, maybe a gobbly **** encrypted code file.

                   

                  You should be able to use wget or other schedule task tools, if the server is configured to run ColdFusion.  But the built in scheduler is prety damn simple to use.

                  • 7. Re: coldfusion scheduling task using wget
                    ilssac Level 5

                    Interesting Adobe's Jive Software forum will allow:

                     

                    D.A.M.N.

                     

                    But NOT

                     

                    G.O.O.K

                    • 8. Re: coldfusion scheduling task using wget
                      Adam Cameron. Level 5

                      Interesting Adobe's Jive Software forum will allow:

                       

                      D.A.M.N.

                       

                      But NOT

                       

                      G.O.O.K

                       

                      I wonder what happens if I claim to be from Scunthorpe?

                       

                      --

                      Adam

                      • 9. Re: coldfusion scheduling task using wget
                        larkinh5 Level 1

                        Coldfusion is installed on the server BUT colfusion administrator is not offered unless it's a dedicated server.  (if needed I'll move to a different hosting company)

                         

                        The page does work (or the event works) if I put the URL in the http:// address field.

                         

                        So I know I don't have something set up correctly.  I just don't know how to set up the cfscheduler to work with this program since i didn't build it and it's very complicated.

                         

                        but atleast i'm on the right track hopefully.

                         

                        But I'm with you if i can use the coldfusion admin then it may me much easier and may not have as many code issues if I use it.

                        • 10. Re: coldfusion scheduling task using wget
                          ilssac Level 5

                          If you don't have access to the administrator, that is the purpose of the <cfschedule...> tag.

                           

                          This tag (assuming it is not disabled) allows one to set up a Scheduled Task progamatically when one does not or can not access the administrator.

                           

                          If you can set up a scheduled task in ColdFusion is should be pretty much exactly the same as using wget or something similar.

                           

                          Put in the URL and say how often you want the task to run starting when.

                           

                          There are a few extra features, but those are the essential three.

                          • 11. Re: coldfusion scheduling task using wget
                            larkinh5 Level 1

                            Below is what the setup.txt file says.  I see the document you pointed me to for the cfschedule BUT where i'm not sure where to put the tag.  Do I create a cfm file with the cfschedule and once I run the url it will "start" the task?

                             

                            I searched the site for the cfschedule tag (to see if they had it already setup but not turned on) and it's not there.

                             

                            Thanks for any help.

                             

                            Setup three scheduled tasks with CFSCHEDULE or in the ColdFusion Administrator.

                             

                                A. Open the CF Administrator and log in.

                                B. Click the "Scheduled Tasks" link in the automated

                                   tasks section.

                                C. Add task1 with the following properties:

                            (Replace www.yourdomain.com with the actual domain

                                     you are using.)

                             

                                   I. Occuring Daily every 10 minutes

                                  II. Start Time: 00:00:00

                                 III. URL:  www.yourdomain.com/event1/event.cfm

                                  IV. Request Timeout:  600 seconds

                             

                                D. Add task2 with the following properties:

                             

                                   I. Occuring Daily every 10 minutes

                                  II. Start Time: 00:05:00

                                 III. URL:  www.yourdomain.com/event2/event.cfm

                                  IV. Request Timeout:  600 seconds

                             

                                E. Add task3 with the following properties:

                             

                                   I. Occuring Daily every 120 minutes

                                  II. Start Time: 00:05:00

                                 III. URL:  www.yourdomain.com/event5/event.cfm

                                  IV. Request Timeout:  600 seconds

                             

                            Message was edited by: larkinh5

                            • 12. Re: coldfusion scheduling task using wget
                              ilssac Level 5

                              larkinh5 wrote:

                               

                              Do I create a cfm file with the cfschedule and once I run the url it will "start" the task?

                               

                               

                              Exactly, create a CFML file with three <cfschedule...> tags, one for each of the items you need to create.  Run this file once on the server where you want the tasks created and the schedule tasks will be created.  Baring the hosting provider blocking the tag.

                               

                              For example create a file (i.e. mySchedule.cfm) and put it on the server.  The root should be fine.  Then you can execute it with http://******/mySchedule.cfm

                              • 13. Re: coldfusion scheduling task using wget
                                larkinh5 Level 1

                                Thank you so much for your help...I will try this and if there's a problem I'll post back. 

                                 

                                That's the only thing i worry about is that the host may block the tag because only dedicated servers can use the coldfusion admin.

                                 

                                If it works then great otherwise I have no problem moving hosting to another hosting company.

                                 

                                Again thank you!!

                                -H

                                • 14. Re: coldfusion scheduling task using wget
                                  ilssac Level 5

                                  I think would be a bit unusual for this tag to be blocked, as the reason for the tags creation was for just this scenario.

                                   

                                  But, if they do, then they probably have a mechnism to request configurations such as a schedule task.  Just like they do for any other administrator setting such as Data Source Names.  It is rather usual that shared hosting can not share access to the administrator, but requests to technical support should get the configuraitons accomplished.

                                  • 15. Re: coldfusion scheduling task using wget
                                    larkinh5 Level 1

                                    HOLY CRAP!!!!  it worked!!!!

                                     

                                    I did ask the hosting company and they DON'T block that tag...So I tried it and it worked...you don't know how happy I am about this

                                     

                                    I've been messing with this for a while...

                                     

                                    again thank you!!!!!