Skip to main content
Known Participant
December 13, 2010
Answered

coldfusion scheduling task using wget

  • December 13, 2010
  • 2 replies
  • 2893 views

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.

This topic has been closed for replies.
Correct answer ilssac

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


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

2 replies

ilssac
Inspiring
December 13, 2010

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.

larkinh5Author
Known Participant
December 13, 2010

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

ilssac
Inspiring
December 13, 2010

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 gook 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.

ilssac
Inspiring
December 13, 2010

Is there some reason you are NOT using ColdFusion's own built-in scheduling ability?

http://livedocs.adobe.com/coldfusion/8/htmldocs/basiconfig_22.html#1328698

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_r-s_11.html#1843993

larkinh5Author
Known Participant
December 13, 2010

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

ilssac
Inspiring
December 13, 2010

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?