Scheduled Tasks List


#1

Would it be possible to sort the tasks by name? We have added many tasks, and it is hard to see if all the tasks that go together by name are properly set with timing etc. I have used the filter function, but I would still prefer to sort by name, and not by date added.


#2

Hi Kenny, you can get your tasks as a query and sort by any column you like:

schedule action="list" returnVariable="result";
result.sort( "task" );
Dump( result );

#3

That is indeed excellent! I dit not know that!


#4

schedule action=“list” returnVariable=“result”;

What format and object is that, is it “tag notation” in cfscript?

PS: New to Lucee, been on ACF since many years, but I did not see that syntax before.


#5

Yes it’s “tags in script”. The object returned is a query.


#6

Very nice! I have never seen that. So I looked up cfschedule and did this:
cfschedule(action="list", returnVariable="qScheduledTasks");

Don’t know why, by that syntax seems more in line with general syntax.


#7

You’re right. For compatibility with ACF you should use cfschedule().


#8

I still think it would be nice to have the scheduled task list sorted by task name in the lucee/admin/web interface.


#9

Is there any way to generate a list of all scheduled tasks for the server context (all of the web contexts) insead of each web context seperately?