Is there any way to add scheduled tasks through the CFAdmin API?
I have a bunch (over 50) that I need to add in our development environment... I've really found the ability to add event gateways and DSNs through the API to be very helpful in this environment, so I decided to try the same for scheduled tasks.
Looks like it is not as well documented... here is my code:
<cfscript>
// Login to CF Adminapi
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("admin");
// instantiate servermanager obj
evObj = createObject("component","cfide.adminapi._servermanager.servermanager");
// instantiate scheduledwrapper obj
swrapObj = createObject("component","cfide.adminapi._servermanager.schedulerwrapper");
swrapObj.init();
taskStruct = StructNew();
StructInsert(taskStruct,"taskname","testSpoolCleaner");
StructInsert(taskStruct,"dwminterval","daily");
StructInsert(taskStruct,"scheduletype","recurring");
StructInsert(taskStruct,"start_date",createDateTime(2011,10,18,1,0,0));
StructInsert(taskStruct,"scheduledURL","http://<my url>");
// too bad... looks like the rest of the methods I need are private to Coldfusion; can't access them..
It says method not found.
popWrapper = swrapObj.populateSchedulerWrapper(taskStruct);
setTask = evObj.setScheduledTasks(swrapObj);
</cfscript>
Google returns no references to anyone attempting this... help?
