Simple command to sort a crontab file, if you are using a file like crontab.txt
$ egrep -rv '^\s*[#;]|^\s*$' crontab.txt | perl -ane 'print join("\t", @F[0..5], join(" ", @F[6..$#F])),"\n" unless /MAILTO/' | sort -nt$'\t' -k2 -k1 | column -t -s$'\t' > crontab-out.txt
Details: sort-crontab-notes.txt
