getScheduleTasks()
Last updated February 25, 2005
Version: 1 | Requires: CF6 | Library: UtilityLib
Description:
This function will return a query listing all the scheduled task on a ColdFusion server to which you do not have administrative access. Following are the columns in the returned query
disabled,file,http_port,http_proxy_port,interval,operation,password,path,proxy_server,publish,request_time_out,resolveurl,start_date,start_time,task,url,username
Additionally if no schduled task exists, it will return an empty query with one column named 'nothing'.
Note: Because this function uses some undocumented features, which might not be available in future releases, and Macromedia will not support code that uses these features.
Return Values:
Returns a query.
Example:
<cfdump var="#getScheduledTasks()#">
Parameters:
No arguments.
Full UDF Source:
/**
* This function will return a query listing all the schedule task on a ColdFusion server without admin access.
*
* @return Returns a query.
* @author Qasim Rasheed (qasimrasheed@hotmail.com)
* @version 1, February 24, 2005
*/
function getScheduledTasks(){
var i = "";
var j = "";
var retquery = "";
var alltasks = createobject("java","coldfusion.server.ServiceFactory").getCronService().listall();
if (arraylen(alltasks )) {
retquery = querynew(structkeylist(alltasks[1]));
queryaddrow(retquery, arraylen(alltasks));
for (i=1; i lte arraylen(alltasks); i = i+1){
for (j in alltasks[i])
querysetcell(retquery, j, alltasks[i][j]);
}
}
else retquery = querynew( 'nothing' );
return retquery;
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016