[james] #X added sorting to scheduled tasks