• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfschedule location and file type

New Here ,
Apr 04, 2018 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 -->

Views

385

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
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 04, 2018 Apr 04, 2018

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

Votes

Translate

Translate
Community Expert ,
Apr 04, 2018 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

Votes

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
community guidelines
New Here ,
Apr 04, 2018 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?

Votes

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
community guidelines
LEGEND ,
Apr 05, 2018 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,

^ _ ^

Votes

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
community guidelines
New Here ,
Apr 05, 2018 Apr 05, 2018

Copy link to clipboard

Copied

LATEST

Thank you for your help.

Votes

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
community guidelines
Resources
Documentation