Now try this in the browser console:
document.querySelector("div#schedulerSch .k-scheduler-content>table td:nth-child(5) > span").click()
When you have proved that works, then you can place it in your Test Case. Your code above uses j
as a cell index so something like this:
for (int j = 0; j < Cols.size(); j++) {
if(...) {
String js = '''
document.querySelector("div#schedulerSch .k-scheduler-content>table td:nth-child(${j}) > span").click()
'''
WebUI.executeJavaScript(js, null)
...
For background on using CSS and JS in Groovy/TestCases: