Provides a programmatic interface to the CFML scheduling
engine. Can run a CFML page at scheduled intervals, with the
option to write the page output to a static HTML page. This
feature enables you to schedule pages that publish data, such
as reports, without waiting while a database transaction is
performed to populate the page.

  <cfschedule action="delete" task="">

 cfschedule(action="delete", task="");

cfschedule Attribute Reference

action string

delete: deletes the specified task
update: updates an existing task or creates a new task,
if one with the name specified by the task attribute
does not exist
run: executes the specified task
pause: Pauses the specified task.
resume: Continues executing the specified task.
list: Lists all the scheduled tasks.
  • delete
  • update
  • run
  • pause
  • resume
  • list

task string

Name of the task.

operation string

Operation that the scheduler performs. Must be HTTPRequest.

file string

Name of the file in which to store the published output of
the scheduled task

path string

Path to the directory in which to put the published file.

startdate string

Date on which to first run the scheduled task.

starttime string

Time at which to run the scheduled of task starts.


URL of the page to execute.

port numeric
Default: 80

Port to use on the server that is specified by the url
parameter. If resolveURL = "yes", retrieved document URLs
that specify a port number are automatically resolved, to
preserve links in the retrieved document. A port value in
the url attribute overrides this value.

publish boolean
Default: false

Yes: save the result to a file
No: does not

endDate string

Date when scheduled task ends.

endTime numeric

Time when scheduled task ends (seconds).

interval string

Interval at which task is scheduled.
* number of seconds (minimum is 60)
* once
* daily
* weekly
* monthly
  • once
  • daily
  • weekly
  • monthly

requesttimeout numeric

Deprecated as of CF 11+ used to extend the default timeout period.

username string

Username, if URL is protected.

password string

Password, if URL is protected.

proxyserver string

Host name or IP address of a proxy server.

proxyport numeric
Default: 80

Port number to use on the proxy server.

proxyuser string

User name to provide to the proxy server.

proxypassword string

Password to provide to the proxy server.

resolveurl boolean
Default: false

Yes: resolve links in the output page to absolute
No: does not

group string
Default: default

The group to which the scheduled task belongs.

mode string
Default: server

If the task is server-specific or application specific.

result (coldfusion)/returnvariable (lucee) query

Name for the query in which cfschedule returns the result variables.

Examples sample code using the cfschedule tag

Tell Coldfusion to run 'importData.cfm' daily at 7AM

 startTime="7:00 AM"
 interval="daily" />

Delete the task 'importMyCSVFileToDB' from the list of Coldfusion scheduled jobs

 task="importMyCSVFileToDB" />

Fork me on GitHub