Highlighted

cfschedule location and file type

New Here ,
Apr 04, 2018

Copy link to clipboard

Copied

good morning,

i've been using CF for about 1.5 years. I'M using Coldfusion 2016 in a windows PC. I'm trying to figure out the location to save a <cfschedule> document.

1 Should the file be saved as a regular .cfm file or do I save it as a template  ".dwt.cfm" file and put it into the template folder of my file directory?

The reason is that I am not getting any thing to fire-off

2. My second question is: can  multiple <cfschedule> code be placed inside of the same coldfusion file?

Below is my code that I used to point to the file to execute...

<!-- TemplateBeginEditable name="head" -->

<!--- This read-only example schedules a task.

To run the example, remove the comments around the code

and change the startDate, startTime, url, file, and path attributes

to appropriate values. --->

<cfschedule action = "update"

task = "ove3r0"

operation = "HTTPRequest"

url = "www.studentlt.com\scheduled_tasks\over30.cfm"

startDate = "3/31/18"

startTime = "6:00 AM"

interval = "86401"

resolveURL = "yes"

publish = "Yes"

file = "sample.html"

path = "D:\home\studentlt.com\wwwroot\SR\scheduled_tasks\"

requestTimeOut = "600"> <!-- TemplateEndEditable -->

Adobe Community Professional
Correct answer by Dave Watts | Adobe Community Professional

There isn't a "right" location to save a file created by CFSCHEDULE. The right location for you will depend on what you want to do with the file, and what's in it. Likewise, there's no correct extension really, but most CFSCHEDULE calls will simply generate HTML output so you'd probably use .html unless you explicitly want the output to be run through CF for some reason.

You can have as many CFSCHEDULE tags as you want within a file.

Dave Watts, Fig Leaf Software

Views

209

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfschedule location and file type

New Here ,
Apr 04, 2018

Copy link to clipboard

Copied

good morning,

i've been using CF for about 1.5 years. I'M using Coldfusion 2016 in a windows PC. I'm trying to figure out the location to save a <cfschedule> document.

1 Should the file be saved as a regular .cfm file or do I save it as a template  ".dwt.cfm" file and put it into the template folder of my file directory?

The reason is that I am not getting any thing to fire-off

2. My second question is: can  multiple <cfschedule> code be placed inside of the same coldfusion file?

Below is my code that I used to point to the file to execute...

<!-- TemplateBeginEditable name="head" -->

<!--- This read-only example schedules a task.

To run the example, remove the comments around the code

and change the startDate, startTime, url, file, and path attributes

to appropriate values. --->

<cfschedule action = "update"

task = "ove3r0"

operation = "HTTPRequest"

url = "www.studentlt.com\scheduled_tasks\over30.cfm"

startDate = "3/31/18"

startTime = "6:00 AM"

interval = "86401"

resolveURL = "yes"

publish = "Yes"

file = "sample.html"

path = "D:\home\studentlt.com\wwwroot\SR\scheduled_tasks\"

requestTimeOut = "600"> <!-- TemplateEndEditable -->

Adobe Community Professional
Correct answer by Dave Watts | Adobe Community Professional

There isn't a "right" location to save a file created by CFSCHEDULE. The right location for you will depend on what you want to do with the file, and what's in it. Likewise, there's no correct extension really, but most CFSCHEDULE calls will simply generate HTML output so you'd probably use .html unless you explicitly want the output to be run through CF for some reason.

You can have as many CFSCHEDULE tags as you want within a file.

Dave Watts, Fig Leaf Software

Views

210

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 04, 2018 0
Adobe Community Professional ,
Apr 04, 2018

Copy link to clipboard

Copied

There isn't a "right" location to save a file created by CFSCHEDULE. The right location for you will depend on what you want to do with the file, and what's in it. Likewise, there's no correct extension really, but most CFSCHEDULE calls will simply generate HTML output so you'd probably use .html unless you explicitly want the output to be run through CF for some reason.

You can have as many CFSCHEDULE tags as you want within a file.

Dave Watts, Fig Leaf Software

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 04, 2018 0
New Here ,
Apr 04, 2018

Copy link to clipboard

Copied

Dave,

Thank you for clearing up my 2nd question. For my 1st question, I guess what I'm asking is does the file extension that the cfschedule itself is written in, need to be saved as a ".CFM" file or a ".dwt.cfm"  and does it matter where that same cfschedule file stored?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 04, 2018 0
LEGEND ,
Apr 05, 2018

Copy link to clipboard

Copied

.dwt is, unless I'm missing something, a Dreamweaver template.  .dwt files have nothing to do with ColdFusion.

You _can_ name the file with .dwt.cfm, or you can name it with just .cfm or even .cfml.  The important thing to remember is that if the file does not end with .cfm, .cfml, or .cfc (for components), ColdFusion server will not be involved with it.

HTH,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 05, 2018 1
New Here ,
Apr 05, 2018

Copy link to clipboard

Copied

Thank you for your help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 05, 2018 0