This could really save me. My hosting company is threatening to turn off read access to neo-cron.xml after I rolled out my app assuming I could read it. They do seem to allow CreateObject.

I am not a java programmer, but can you tell me if there is a not-too-hard way to read the individual elements/nodes of the cronservice e.g. cronservice[1].task, cronservice[4].interval, etc.

>
> What you need to have is the cronservice and then listAll().
> <cflock name="serviceFactory" type="exclusive" timeout="10">
  
> <cfscript>
   
> factory = CreateObject("java", "coldfusion.server.ServiceFactory");
   
> cronservice = factory.cronservice;
   
> tasks = cronservice.listAll();
  
> </cfscript>
  
> <cfdump var="#tasks#">
> </cflock>
>
> This will return a complete list of all the scheduled tasks defined on
> the system. To make sure you can always identify which task belongs to
> who you should stick to some convention for the name. The actual
> changing of tasks can be done using cfschedule (be sure to revoke
> cfschedule permissions for your clients).
> Make sure your clients don't schedule anything between 02:00 and 03:00
> because of DST issues.
>
Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to