Scheduled Tasks List

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.

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 );

That is indeed excellent! I dit not know that!

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.

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

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.

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

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

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?

I am at a total loss here. Yesterday I went to my scheduled tasks in the web admin and all the tasks were gone, I added a few back and later restarted my server. When I went back the entire old list was back but none of the new entries were there. Tasks were working a few even doubled up.

My scheduler.xml file is full, has all the original tasks in it.

If I try to do any of these…There are no results. How can the xml file be full, how can they be working, but I get no results. I have no way of knowing what or where all the scheduled tasks are.

<cfscript>
	cfschedule(action="list", returnVariable="qScheduledTasks");
</cfscript>
<cfdump var="#qScheduledTasks#">
test

<cfscript>
	schedule action="list" returnVariable="result";
	result.sort( "task" );
	Dump( result );
</cfscript>
test2

<cfschedule action="list" returnvariable="listall">
<cfdump var="#listall#">
test3

Please always mention which version of Lucee you are using

Lucee 5.3.2.77

seems like it might be related to https://luceeserver.atlassian.net/browse/LDEV-2112 which couldn’t be reproduced

You could try bumping up the log level for your scheduler.log under the web admin?