IsScheduledTask(Task)
Last updated October 16, 2002
Version: 1 | Requires: CF6 | Library: UtilityLib
Description:
Returns true if the specified task name exists as a scheduled task in the CF Administrator.
Return Values:
Returns a Boolean.
Example:
<CFOUTPUT>
Is "Test" a scheduled task? #IsScheduledTask("test")#
</CFOUTPUT>
Parameters:
Name | Description | Required |
---|---|---|
Task | Task name you want to verify. | Yes |
Full UDF Source:
<!---
Returns true if the specified task name exists as a scheduled task in the CF Administrator.
@param Task Task name you want to verify. (Required)
@return Returns a Boolean.
@author Rob Brooks-Bilson (rbils@amkor.com)
@version 1, October 16, 2002
--->
<CFFUNCTION NAME="IsScheduledTask" RETURN="Boolean">
<CFARGUMENT NAME="TaskName" REQUIRED="True" TYPE="String">
<!--- var local vars for the func --->
<CFSET Var TaskXML="">
<CFSET Var GetTasks="">
<!--- get the scheduler xml file. It's stored as WDDX --->
<CFFILE ACTION="Read"
FILE="#Server.ColdFusion.RootDir#\lib\neo-cron.xml"
VARIABLE="TaskXML">
<!--- convert the WDDX to CFML - and array of structs --->
<CFWDDX ACTION="WDDX2CFML" INPUT="#TaskXML#" OUTPUT="GetTasks">
<!--- search the array of structs for the name passed to the func --->
<CFIF ListContainsNoCase(StructKeyList(GetTasks[1]), Arguments.TaskName) EQ 0>
<CFRETURN False>
<CFELSE>
<CFRETURN True>
</CFIF>
</CFFUNCTION>
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